DebugInfo: Simplify dead variable collection slightly.
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 22 May 2014 00:48:36 +0000 (00:48 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 22 May 2014 00:48:36 +0000 (00:48 +0000)
constructSubprogramDIE was already called for every subprogram in every
CU when the module was started - there's no need to call it again at
module finalization.

llvm-svn: 209372

llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 4a317cf..049e9e2 100644 (file)
@@ -827,10 +827,8 @@ void DwarfDebug::collectDeadVariables() {
         if (Variables.getNumElements() == 0)
           continue;
 
-        // FIXME: See the comment in constructSubprogramDIE about duplicate
-        // subprogram DIEs.
-        constructSubprogramDIE(*SPCU, SP);
         DIE *SPDIE = SPCU->getDIE(SP);
+        assert(SPDIE);
         for (unsigned vi = 0, ve = Variables.getNumElements(); vi != ve; ++vi) {
           DIVariable DV(Variables.getElement(vi));
           assert(DV.isVariable());