mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 16:50:51 +08:00
Updated to latest LLVM. Major LLVM changes:
- Sema is now exported (and there was much rejoicing.) - Storage classes are now centrally defined. Also fixed some bugs that the new LLVM picked up. llvm-svn: 114622
This commit is contained in:
@@ -34,7 +34,7 @@ IRForTarget::IRForTarget(lldb_private::ClangExpressionDeclMap *decl_map,
|
||||
const TargetData *target_data,
|
||||
bool resolve_vars,
|
||||
const char *func_name) :
|
||||
ModulePass(&ID),
|
||||
ModulePass(ID),
|
||||
m_decl_map(decl_map),
|
||||
m_target_data(target_data),
|
||||
m_sel_registerName(NULL),
|
||||
@@ -728,12 +728,22 @@ IRForTarget::resolveExternals(Module &M, BasicBlock &BB)
|
||||
|
||||
static bool isGuardVariableRef(Value *V)
|
||||
{
|
||||
ConstantExpr *C = dyn_cast<ConstantExpr>(V);
|
||||
Constant *C;
|
||||
|
||||
if (!C || C->getOpcode() != Instruction::BitCast)
|
||||
if (!(C = dyn_cast<Constant>(V)))
|
||||
return false;
|
||||
|
||||
GlobalVariable *GV = dyn_cast<GlobalVariable>(C->getOperand(0));
|
||||
ConstantExpr *CE;
|
||||
|
||||
if ((CE = dyn_cast<ConstantExpr>(V)))
|
||||
{
|
||||
if (CE->getOpcode() != Instruction::BitCast)
|
||||
return false;
|
||||
|
||||
C = CE->getOperand(0);
|
||||
}
|
||||
|
||||
GlobalVariable *GV = dyn_cast<GlobalVariable>(C);
|
||||
|
||||
if (!GV || !GV->hasName() || !GV->getName().startswith("_ZGV"))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user