summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 6960ec94551..91a7b6e53aa 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -557,16 +557,11 @@ DIE *DwarfDebug::createScopeChildrenDIE(
}
void DwarfDebug::createAndAddScopeChildren(DwarfCompileUnit &TheCU,
- LexicalScope *Scope,
- DISubprogram Sub, DIE &ScopeDIE) {
+ LexicalScope *Scope, DIE &ScopeDIE) {
// We create children when the scope DIE is not null.
SmallVector<std::unique_ptr<DIE>, 8> Children;
if (DIE *ObjectPointer = createScopeChildrenDIE(TheCU, Scope, Children))
- // The declaration will have the object_pointer, otherwise put it on the
- // definition. This happens with ObjC blocks that have object_pointer on
- // non-member functions.
- if (!Sub.getFunctionDeclaration())
- TheCU.addDIEEntry(ScopeDIE, dwarf::DW_AT_object_pointer, *ObjectPointer);
+ TheCU.addDIEEntry(ScopeDIE, dwarf::DW_AT_object_pointer, *ObjectPointer);
// Add children
for (auto &I : Children)
@@ -585,7 +580,7 @@ void DwarfDebug::constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU,
if (DIE *ScopeDIE = TheCU.getDIE(Sub)) {
AbstractSPDies.insert(std::make_pair(Sub, ScopeDIE));
- createAndAddScopeChildren(TheCU, Scope, Sub, *ScopeDIE);
+ createAndAddScopeChildren(TheCU, Scope, *ScopeDIE);
}
}
@@ -602,7 +597,7 @@ DIE &DwarfDebug::constructSubprogramScopeDIE(DwarfCompileUnit &TheCU,
DIE &ScopeDIE = updateSubprogramScopeDIE(TheCU, Sub);
- createAndAddScopeChildren(TheCU, Scope, Sub, ScopeDIE);
+ createAndAddScopeChildren(TheCU, Scope, ScopeDIE);
return ScopeDIE;
}
OpenPOWER on IntegriCloud