Revert the rest of r192749 to bring back the buildbot. These two
authorEric Christopher <echristo@gmail.com>
Fri, 18 Oct 2013 16:56:48 +0000 (16:56 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 18 Oct 2013 16:56:48 +0000 (16:56 +0000)
error messages should not be able to occur at the same time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192985 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 755f27867ec229525a8311f80be1497859508930..738b879fcef15edaf100091dac2e6e4d3b361dae 100644 (file)
@@ -994,8 +994,10 @@ void DwarfDebug::collectDeadVariables() {
         // Construct subprogram DIE and add variables DIEs.
         CompileUnit *SPCU = CUMap.lookup(TheCU);
         assert(SPCU && "Unable to find Compile Unit!");
-        DIE *SPDIE = SPCU->getDIE(SP);
-        assert(SPDIE && "Subprogram wasn't created?");
+       // FIXME: See the comment in constructSubprogramDIE about duplicate
+       // subprogram DIEs.
+       constructSubprogramDIE(SPCU, SP);
+       DIE *SPDIE = SPCU->getDIE(SP);
         for (unsigned vi = 0, ve = Variables.getNumElements(); vi != ve; ++vi) {
           DIVariable DV(Variables.getElement(vi));
           if (!DV.isVariable())