summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-26 22:12:18 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-26 22:12:18 +0000
commit5fc870ddf59de56d0947c0a067a41a5c36d10993 (patch)
treedc23d400e71565079a3a63b075adce8087cde70c
parent708d6805654d9296937d8f8751e660909c41912a (diff)
downloadllvm-5fc870ddf59de56d0947c0a067a41a5c36d10993.tar.gz
llvm-5fc870ddf59de56d0947c0a067a41a5c36d10993.tar.bz2
llvm-5fc870ddf59de56d0947c0a067a41a5c36d10993.tar.xz
DebugInfo: Fix and test a regression caused by r207263 causing the DW_AT_object_pointer to go missing on blocks
Noticed by inspection. Test coverage added. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207333 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
-rw-r--r--test/DebugInfo/X86/debug-info-blocks.ll1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 0465b8929a..69f7d1146d 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -538,9 +538,9 @@ DIE *DwarfDebug::createScopeChildrenDIE(
std::unique_ptr<DIE> Variable =
TheCU.constructVariableDIE(*DV, Scope->isAbstractScope());
assert(Variable);
- Children.push_back(std::move(Variable));
if (DV->isObjectPointer())
ObjectPointer = Variable.get();
+ Children.push_back(std::move(Variable));
}
for (LexicalScope *LS : Scope->getChildren())
if (DIE *Nested = constructScopeDIE(TheCU, LS))
diff --git a/test/DebugInfo/X86/debug-info-blocks.ll b/test/DebugInfo/X86/debug-info-blocks.ll
index 9daeceeb77..b2531f6470 100644
--- a/test/DebugInfo/X86/debug-info-blocks.ll
+++ b/test/DebugInfo/X86/debug-info-blocks.ll
@@ -7,6 +7,7 @@
; CHECK: DW_TAG_subprogram
; CHECK: DW_AT_name{{.*}}_block_invoke
+; CHECK: DW_AT_object_pointer
; CHECK-NOT: DW_TAG_subprogram
; CHECK: DW_TAG_formal_parameter