[llvm] r207333 - DebugInfo: Fix and test a regression caused by r207263 causing the DW_AT_object_pointer to go missing on blocks

David Blaikie dblaikie at gmail.com
Sat Apr 26 15:12:19 PDT 2014


Author: dblaikie
Date: Sat Apr 26 17:12:18 2014
New Revision: 207333

URL: http://llvm.org/viewvc/llvm-project?rev=207333&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    llvm/trunk/test/DebugInfo/X86/debug-info-blocks.ll

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=207333&r1=207332&r2=207333&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Sat Apr 26 17:12:18 2014
@@ -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))

Modified: llvm/trunk/test/DebugInfo/X86/debug-info-blocks.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/debug-info-blocks.ll?rev=207333&r1=207332&r2=207333&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/debug-info-blocks.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/debug-info-blocks.ll Sat Apr 26 17:12:18 2014
@@ -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





More information about the llvm-commits mailing list