[llvm] r207334 - DwarfDebug: Roll argument into call.

David Blaikie dblaikie at gmail.com
Sat Apr 26 15:37:46 PDT 2014


Author: dblaikie
Date: Sat Apr 26 17:37:45 2014
New Revision: 207334

URL: http://llvm.org/viewvc/llvm-project?rev=207334&view=rev
Log:
DwarfDebug: Roll argument into call.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=207334&r1=207333&r2=207334&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Sat Apr 26 17:37:45 2014
@@ -515,12 +515,10 @@ DIE *DwarfDebug::createScopeChildrenDIE(
   if (LScopes.isCurrentFunctionScope(Scope)) {
     for (DbgVariable *ArgDV : CurrentFnArguments)
       if (ArgDV) {
-        std::unique_ptr<DIE> Arg =
-            TheCU.constructVariableDIE(*ArgDV, Scope->isAbstractScope());
-        assert(Arg);
+        Children.push_back(
+            TheCU.constructVariableDIE(*ArgDV, Scope->isAbstractScope()));
         if (ArgDV->isObjectPointer())
-          ObjectPointer = Arg.get();
-        Children.push_back(std::move(Arg));
+          ObjectPointer = Children.back().get();
       }
 
     // If this is a variadic function, add an unspecified parameter.
@@ -535,12 +533,10 @@ DIE *DwarfDebug::createScopeChildrenDIE(
 
   // Collect lexical scope children first.
   for (DbgVariable *DV : ScopeVariables.lookup(Scope)) {
-    std::unique_ptr<DIE> Variable =
-        TheCU.constructVariableDIE(*DV, Scope->isAbstractScope());
-    assert(Variable);
+    Children.push_back(
+        TheCU.constructVariableDIE(*DV, Scope->isAbstractScope()));
     if (DV->isObjectPointer())
-      ObjectPointer = Variable.get();
-    Children.push_back(std::move(Variable));
+      ObjectPointer = Children.back().get();
   }
   for (LexicalScope *LS : Scope->getChildren())
     if (DIE *Nested = constructScopeDIE(TheCU, LS))





More information about the llvm-commits mailing list