diff options
author | Devang Patel <dpatel@apple.com> | 2011-05-05 17:54:26 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-05-05 17:54:26 +0000 |
commit | d96efb83c11454f511f6b16bbf1fb07d8a14ef66 (patch) | |
tree | 2a591cc15371bf05c4fbc261f2c34798b02c0350 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 297015913a563caf0c3f27c63ba1822646c94579 (diff) |
If debug info for inlined function is missing then handle it gracefully.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130933 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 2e563dd084..e8479c506f 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -588,12 +588,14 @@ DIE *DwarfDebug::constructInlinedScopeDIE(DbgScope *Scope) { if (!Scope->getScopeNode()) return NULL; DIScope DS(Scope->getScopeNode()); - DIE *ScopeDIE = new DIE(dwarf::DW_TAG_inlined_subroutine); - DISubprogram InlinedSP = getDISubprogram(DS); CompileUnit *TheCU = getCompileUnit(InlinedSP); DIE *OriginDIE = TheCU->getDIE(InlinedSP); - assert(OriginDIE && "Unable to find Origin DIE!"); + if (!OriginDIE) { + DEBUG(dbgs() << "Unable to find original DIE for inlined subprogram."); + return NULL; + } + DIE *ScopeDIE = new DIE(dwarf::DW_TAG_inlined_subroutine); TheCU->addDIEEntry(ScopeDIE, dwarf::DW_AT_abstract_origin, dwarf::DW_FORM_ref4, OriginDIE); |