mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
Add DwarfCompileUnit::getSkeleton that returns DwarfCompileUnit* to avoid having to cast from DwarfUnit* on every call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221031 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -42,6 +42,10 @@ public:
|
|||||||
DwarfCompileUnit(unsigned UID, DICompileUnit Node, AsmPrinter *A,
|
DwarfCompileUnit(unsigned UID, DICompileUnit Node, AsmPrinter *A,
|
||||||
DwarfDebug *DW, DwarfFile *DWU);
|
DwarfDebug *DW, DwarfFile *DWU);
|
||||||
|
|
||||||
|
DwarfCompileUnit *getSkeleton() const {
|
||||||
|
return static_cast<DwarfCompileUnit *>(Skeleton);
|
||||||
|
}
|
||||||
|
|
||||||
void initStmtList(MCSymbol *DwarfLineSectionSym);
|
void initStmtList(MCSymbol *DwarfLineSectionSym);
|
||||||
|
|
||||||
/// Apply the DW_AT_stmt_list from this compile unit to the specified DIE.
|
/// Apply the DW_AT_stmt_list from this compile unit to the specified DIE.
|
||||||
|
@ -550,8 +550,7 @@ void DwarfDebug::finalizeModuleInfo() {
|
|||||||
if (TheU->getUnitDie().getTag() == dwarf::DW_TAG_compile_unit) {
|
if (TheU->getUnitDie().getTag() == dwarf::DW_TAG_compile_unit) {
|
||||||
// If we're splitting the dwarf out now that we've got the entire
|
// If we're splitting the dwarf out now that we've got the entire
|
||||||
// CU then add the dwo id to it.
|
// CU then add the dwo id to it.
|
||||||
DwarfCompileUnit *SkCU =
|
DwarfCompileUnit *SkCU = TheU->getSkeleton();
|
||||||
static_cast<DwarfCompileUnit *>(TheU->getSkeleton());
|
|
||||||
if (useSplitDwarf()) {
|
if (useSplitDwarf()) {
|
||||||
// Emit a unique identifier for this CU.
|
// Emit a unique identifier for this CU.
|
||||||
uint64_t ID = DIEHash(Asm).computeCUSignature(TheU->getUnitDie());
|
uint64_t ID = DIEHash(Asm).computeCUSignature(TheU->getUnitDie());
|
||||||
@ -1580,7 +1579,7 @@ void DwarfDebug::emitDebugPubSection(
|
|||||||
if (Globals.empty())
|
if (Globals.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (auto Skeleton = static_cast<DwarfCompileUnit *>(TheU->getSkeleton()))
|
if (auto Skeleton = TheU->getSkeleton())
|
||||||
TheU = Skeleton;
|
TheU = Skeleton;
|
||||||
unsigned ID = TheU->getUniqueID();
|
unsigned ID = TheU->getUniqueID();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user