DebugInfo: Fix and test a regression caused by r207263 causing the DW_AT_object_point...
authorDavid Blaikie <dblaikie@gmail.com>
Sat, 26 Apr 2014 22:12:18 +0000 (22:12 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Sat, 26 Apr 2014 22:12:18 +0000 (22:12 +0000)
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
test/DebugInfo/X86/debug-info-blocks.ll

index 0465b8929a72c64e8e2b6251de2e554958dd1e59..69f7d1146d9c17cf7238af81859d862f376c595e 100644 (file)
@@ -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))
index 9daeceeb7799a68a492f463980a52ca8a1871ef7..b2531f64708363a027b29783add50cb145294107 100644 (file)
@@ -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