File tree Expand file tree Collapse file tree 3 files changed +5
-103
lines changed Expand file tree Collapse file tree 3 files changed +5
-103
lines changed Original file line number Diff line number Diff line change @@ -466,6 +466,9 @@ class DwarfDebug : public DebugHandlerBase {
466
466
// / Construct a DIE for this abstract scope.
467
467
void constructAbstractSubprogramScopeDIE (DwarfCompileUnit &SrcCU, LexicalScope *Scope);
468
468
469
+ // / Construct a DIE for the subprogram definition \p SP and return it.
470
+ DIE &constructSubprogramDefinitionDIE (const DISubprogram *SP);
471
+
469
472
// / Construct DIEs for call site entries describing the calls in \p MF.
470
473
void constructCallSiteEntryDIEs (const DISubprogram &SP, DwarfCompileUnit &CU,
471
474
DIE &ScopeDIE, const MachineFunction &MF);
@@ -763,9 +766,6 @@ class DwarfDebug : public DebugHandlerBase {
763
766
// / * DW_FORM_data4 for 32-bit DWARFv3 and DWARFv2.
764
767
dwarf::Form getDwarfSectionOffsetForm () const ;
765
768
766
- // / Construct a DIE for the subprogram definition \p SP and return it.
767
- DIE &constructSubprogramDefinitionDIE (const DISubprogram *SP);
768
-
769
769
// / Returns the previous CU that was being updated
770
770
const DwarfCompileUnit *getPrevCU () const { return PrevCU; }
771
771
void setPrevCU (const DwarfCompileUnit *PrevCU) { this ->PrevCU = PrevCU; }
Original file line number Diff line number Diff line change @@ -545,13 +545,8 @@ DIE *DwarfUnit::getOrCreateContextDIE(const DIScope *Context) {
545
545
return getOrCreateTypeDIE (T);
546
546
if (auto *NS = dyn_cast<DINamespace>(Context))
547
547
return getOrCreateNameSpace (NS);
548
- if (auto *SP = dyn_cast<DISubprogram>(Context)) {
549
- // Subprogram definitions should be created in the Unit that they specify,
550
- // which might not be "this" unit when type definitions move around under
551
- // LTO.
552
- assert (SP->isDefinition ());
553
- return &DD->constructSubprogramDefinitionDIE (SP);
554
- }
548
+ if (auto *SP = dyn_cast<DISubprogram>(Context))
549
+ return getOrCreateSubprogramDIE (SP);
555
550
if (auto *M = dyn_cast<DIModule>(Context))
556
551
return getOrCreateModule (M);
557
552
return getDIE (Context);
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments