From 2b4669de8a893e2c62b808c509f2f3e74057f29a Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Sat, 26 Apr 2014 22:12:18 +0000 Subject: 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. llvm-svn: 207333 --- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 0465b8929a7..69f7d1146d9 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/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)) -- cgit v1.2.3