mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Sink DwarfUnit::Skeleton down into DwarfCompileUnit
Type units no longer have skeletons and it's misleading to be able to query for a type unit's skeleton (it might incorrectly lead one to conclude that if a unit doesn't have a skeleton it's not in a .dwo file... ). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221055 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -33,6 +33,9 @@ class DwarfCompileUnit : public DwarfUnit {
|
||||
/// the need to search for it in applyStmtList.
|
||||
unsigned stmtListIndex;
|
||||
|
||||
/// Skeleton unit associated with this unit.
|
||||
DwarfUnit *Skeleton;
|
||||
|
||||
/// \brief Construct a DIE for the given DbgVariable without initializing the
|
||||
/// DbgVariable's DIE reference.
|
||||
std::unique_ptr<DIE> constructVariableDIEImpl(const DbgVariable &DV,
|
||||
@@ -134,6 +137,25 @@ public:
|
||||
void finishSubprogramDefinition(DISubprogram SP);
|
||||
|
||||
void collectDeadVariables(DISubprogram SP);
|
||||
|
||||
/// If there's a skeleton then return the begin label for the skeleton unit,
|
||||
/// otherwise return the local label for this unit.
|
||||
MCSymbol *getLocalLabelBegin() const {
|
||||
if (Skeleton)
|
||||
return Skeleton->getLabelBegin();
|
||||
return getLabelBegin();
|
||||
}
|
||||
|
||||
/// If there's a skeleton then return the section symbol for the skeleton
|
||||
/// unit, otherwise return the section symbol for this unit.
|
||||
MCSymbol *getLocalSectionSym() const {
|
||||
if (Skeleton)
|
||||
return Skeleton->getSectionSym();
|
||||
return getSectionSym();
|
||||
}
|
||||
|
||||
/// Set the skeleton unit associated with this unit.
|
||||
void setSkeleton(DwarfUnit &Skel) { Skeleton = &Skel; }
|
||||
};
|
||||
|
||||
} // end llvm namespace
|
||||
|
Reference in New Issue
Block a user