From 5fc870ddf59de56d0947c0a067a41a5c36d10993 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Sat, 26 Apr 2014 22:12:18 +0000 Subject: [PATCH] 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 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 +- test/DebugInfo/X86/debug-info-blocks.ll | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 0465b8929a7..69f7d1146d9 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -538,9 +538,9 @@ DIE *DwarfDebug::createScopeChildrenDIE( std::unique_ptr 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 9daeceeb779..b2531f64708 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