diff options
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 0e55b54583..bc4333d9c1 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1482,6 +1482,10 @@ void DwarfDebug::ConstructCompileUnit(MDNode *N) { void DwarfDebug::ConstructGlobalVariableDIE(MDNode *N) { DIGlobalVariable DI_GV(N); + + // If debug information is malformed then ignore it. + if (DI_GV.Verify() == false) + return; // Check for pre-existence. DIE *&Slot = ModuleCU->getDieMapSlotFor(DI_GV.getNode()); |