From 8729bca33364d7a8e384024d092582066621f490 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 22 May 2014 00:48:36 +0000 Subject: [PATCH] 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. llvm-svn: 209372 --- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 4a317cf..049e9e2 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -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()); -- 2.7.4