mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-18 10:31:57 +00:00
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
This commit is contained in:
parent
297015913a
commit
d96efb83c1
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user