mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Use MainCU if it is available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73457 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1757,6 +1757,9 @@ unsigned DwarfDebug::RecordInlinedFnStart(DISubprogram &SP, DICompileUnit CU,
|
||||
if (TimePassesIsEnabled)
|
||||
DebugTimer->startTimer();
|
||||
|
||||
CompileUnit *Unit = MainCU;
|
||||
if (!Unit)
|
||||
Unit = &FindCompileUnit(SP.getCompileUnit());
|
||||
GlobalVariable *GV = SP.getGV();
|
||||
DenseMap<const GlobalVariable *, DbgScope *>::iterator
|
||||
II = AbstractInstanceRootMap.find(GV);
|
||||
@ -1767,7 +1770,6 @@ unsigned DwarfDebug::RecordInlinedFnStart(DISubprogram &SP, DICompileUnit CU,
|
||||
DbgScope *Scope = new DbgScope(NULL, DIDescriptor(GV));
|
||||
|
||||
// Get the compile unit context.
|
||||
CompileUnit *Unit = &FindCompileUnit(SP.getCompileUnit());
|
||||
DIE *SPDie = Unit->getDieMapSlotFor(GV);
|
||||
if (!SPDie)
|
||||
SPDie = CreateSubprogramDIE(Unit, SP, false, true);
|
||||
@ -1789,7 +1791,6 @@ unsigned DwarfDebug::RecordInlinedFnStart(DISubprogram &SP, DICompileUnit CU,
|
||||
// Create a concrete inlined instance for this inlined function.
|
||||
DbgConcreteScope *ConcreteScope = new DbgConcreteScope(DIDescriptor(GV));
|
||||
DIE *ScopeDie = new DIE(dwarf::DW_TAG_inlined_subroutine);
|
||||
CompileUnit *Unit = &FindCompileUnit(SP.getCompileUnit());
|
||||
ScopeDie->setAbstractCompileUnit(Unit);
|
||||
|
||||
DIE *Origin = Unit->getDieMapSlotFor(GV);
|
||||
|
Reference in New Issue
Block a user