summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h4
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp5
2 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index 74c946036c4..9805fb4874e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -42,6 +42,10 @@ public:
DwarfCompileUnit(unsigned UID, DICompileUnit Node, AsmPrinter *A,
DwarfDebug *DW, DwarfFile *DWU);
+ DwarfCompileUnit *getSkeleton() const {
+ return static_cast<DwarfCompileUnit *>(Skeleton);
+ }
+
void initStmtList(MCSymbol *DwarfLineSectionSym);
/// Apply the DW_AT_stmt_list from this compile unit to the specified DIE.
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 5af678ea750..de5ffeded44 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -550,8 +550,7 @@ void DwarfDebug::finalizeModuleInfo() {
if (TheU->getUnitDie().getTag() == dwarf::DW_TAG_compile_unit) {
// If we're splitting the dwarf out now that we've got the entire
// CU then add the dwo id to it.
- DwarfCompileUnit *SkCU =
- static_cast<DwarfCompileUnit *>(TheU->getSkeleton());
+ DwarfCompileUnit *SkCU = TheU->getSkeleton();
if (useSplitDwarf()) {
// Emit a unique identifier for this CU.
uint64_t ID = DIEHash(Asm).computeCUSignature(TheU->getUnitDie());
@@ -1580,7 +1579,7 @@ void DwarfDebug::emitDebugPubSection(
if (Globals.empty())
continue;
- if (auto Skeleton = static_cast<DwarfCompileUnit *>(TheU->getSkeleton()))
+ if (auto Skeleton = TheU->getSkeleton())
TheU = Skeleton;
unsigned ID = TheU->getUniqueID();
OpenPOWER on IntegriCloud