OSDN Git Service

Push the CURangeList down into the skeleton CU (where available) rather than the...
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 3 Nov 2014 21:52:56 +0000 (21:52 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 3 Nov 2014 21:52:56 +0000 (21:52 +0000)
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
lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 714043d..1bb546e 100644 (file)
@@ -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(
index 27cfdcd..a73cb27 100644 (file)
@@ -232,7 +232,7 @@ public:
 
   /// getRangeLists - Get the vector of range lists.
   const SmallVectorImpl<RangeSpanList> &getRangeLists() const {
-    return CURangeLists;
+    return (Skeleton ? Skeleton : this)->CURangeLists;
   }
 
   /// getRanges - Get the list of ranges for this unit.
index 95dedb5..0da1bb8 100644 (file)
@@ -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);