summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfWriter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfWriter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
index 3368f5da41..6a29121acc 100644
--- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
@@ -2125,7 +2125,10 @@ private:
// Get the subprogram die.
DIE *SPDie = Unit->getDieMapSlotFor(SPD.getGV());
- assert(SPDie && "Missing subprogram descriptor");
+ if (!SPDie)
+ /* A subprogram die may not exist if the corresponding function
+ does not have any debug info. */
+ continue;
// Add the function bounds.
AddLabel(SPDie, DW_AT_low_pc, DW_FORM_addr,