diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/IR/DIBuilder.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 2f1b0e5b161..38100bc2f4c 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -103,7 +103,7 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(DIGlobalVariable GV) { assert(GV.isGlobalVariable()); - DIScope GVContext = DD->resolve(GV.getContext()); + DIScope GVContext = GV.getContext(); DIType GTy = DD->resolve(GV.getType()); // Construct the context before querying for the existence of the DIE in @@ -122,7 +122,7 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(DIGlobalVariable GV) { DIE *VariableSpecDIE = getOrCreateStaticMemberDIE(SDMDecl); addDIEEntry(*VariableDIE, dwarf::DW_AT_specification, *VariableSpecDIE); } else { - DeclContext = resolve(GV.getContext()); + DeclContext = GV.getContext(); // Add name and type. addString(*VariableDIE, dwarf::DW_AT_name, GV.getDisplayName()); addType(*VariableDIE, GTy); diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp index be43673bb3e..fa2d5a19768 100644 --- a/llvm/lib/IR/DIBuilder.cpp +++ b/llvm/lib/IR/DIBuilder.cpp @@ -851,7 +851,7 @@ static DIGlobalVariable createGlobalVariableHelper( .concat(isLocalToUnit) .concat(isDefinition) .get(VMContext), - DIScope(TheCtx).getRef(), F, Ty, Val, + TheCtx, F, Ty, Val, DIDescriptor(Decl)}; return DIGlobalVariable(CreateFunc(Elts)); diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index bb5161dcb90..bf3bb8adb0a 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -567,8 +567,8 @@ bool DIGlobalVariable::Verify() const { if (getDisplayName().empty()) return false; - // Make sure context @ field 1 is a ScopeRef. - if (!fieldIsScopeRef(DbgNode, 1)) + // Make sure context @ field 1 is an MDNode. + if (!fieldIsMDNode(DbgNode, 1)) return false; // Make sure that type @ field 3 is a DITypeRef. if (!fieldIsTypeRef(DbgNode, 3)) @@ -1005,7 +1005,7 @@ void DebugInfoFinder::processModule(const Module &M) { for (unsigned i = 0, e = GVs.getNumElements(); i != e; ++i) { DIGlobalVariable DIG(GVs.getElement(i)); if (addGlobalVariable(DIG)) { - processScope(DIG.getContext().resolve(TypeIdentifierMap)); + processScope(DIG.getContext()); processType(DIG.getType().resolve(TypeIdentifierMap)); } } |