From fcd4288009f1829ab4c5a4ea23883a437b220850 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 3 Nov 2014 21:52:56 +0000 Subject: [PATCH] Push the CURangeList down into the skeleton CU (where available) rather than the full CU So that it may be shared between skeleton/full compile unit, for CU ranges and other ranges to be added for fission+gmlt. (at some point we might want some kind of object shared between the skeleton and full compile units for all those things we only want one of in that scope, rather than having the full unit always look through to the skeleton... - alternatively, we might be able to have the skeleton pointer (or another, separate pointer) point to the skeleton or to the unit itself in non-fission, so we don't have to special case its absence) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221186 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 2 +- lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | 2 +- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 714043d0be6..1bb546e54b2 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -395,7 +395,7 @@ DwarfCompileUnit::addScopeRangeList(DIE &ScopeDIE, DD->getLabelAfterInsn(R.second))); // Add the range list to the set of ranges to be emitted. - CURangeLists.push_back(std::move(List)); + (Skeleton ? Skeleton : this)->CURangeLists.push_back(std::move(List)); } void DwarfCompileUnit::attachRangesOrLowHighPC( diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h index 27cfdcdaa48..a73cb27c25f 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h @@ -232,7 +232,7 @@ public: /// getRangeLists - Get the vector of range lists. const SmallVectorImpl &getRangeLists() const { - return CURangeLists; + return (Skeleton ? Skeleton : this)->CURangeLists; } /// getRanges - Get the list of ranges for this unit. diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 95dedb5549b..0da1bb8584b 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -565,7 +565,7 @@ void DwarfDebug::finalizeModuleInfo() { if (!AddrPool.isEmpty()) SkCU->addSectionLabel(SkCU->getUnitDie(), dwarf::DW_AT_GNU_addr_base, DwarfAddrSectionSym, DwarfAddrSectionSym); - if (!TheCU.getRangeLists().empty()) + if (!SkCU->getRangeLists().empty()) SkCU->addSectionLabel(SkCU->getUnitDie(), dwarf::DW_AT_GNU_ranges_base, DwarfDebugRangeSectionSym, DwarfDebugRangeSectionSym); -- 2.34.1