[llvm] r209372 - DebugInfo: Simplify dead variable collection slightly.

David Blaikie dblaikie at gmail.com
Wed May 21 17:48:37 PDT 2014


Author: dblaikie
Date: Wed May 21 19:48:36 2014
New Revision: 209372

URL: http://llvm.org/viewvc/llvm-project?rev=209372&view=rev
Log:
DebugInfo: Simplify dead variable collection slightly.

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.

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=209372&r1=209371&r2=209372&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed May 21 19:48:36 2014
@@ -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());





More information about the llvm-commits mailing list