Do not construct DIE for already processed MDNode.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.cpp
index 73aa8d81eebea210b8e82b5e921ade566e99ad27..50c0feac0911aae35f8b22e0118de44703c2393d 100644 (file)
@@ -2766,7 +2766,8 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
           }
         }
       }
-      constructScopeDIE(*AI);
+      if (ProcessedSPNodes.count((*AI)->getScopeNode()) == 0)
+        constructScopeDIE(*AI);
     }
     
     DIE *CurFnDIE = constructScopeDIE(CurrentFnDbgScope);