From c70aecad29b8e28b348c1f71bf44a05ccde5edff Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 3 Nov 2014 02:41:49 +0000 Subject: [PATCH] Sink range list handling down from DwarfUnit into its only use, in DwarfCompileUnit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221123 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | 15 +++++++++++++++ lib/CodeGen/AsmPrinter/DwarfUnit.h | 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h index b924d270420..d193ad805f7 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h @@ -48,6 +48,10 @@ class DwarfCompileUnit : public DwarfUnit { /// GlobalTypes - A map of globally visible types for this unit. StringMap GlobalTypes; + // List of range lists for a given compile unit, separate from the ranges for + // the CU itself. + SmallVector CURangeLists; + /// \brief Construct a DIE for the given DbgVariable without initializing the /// DbgVariable's DIE reference. std::unique_ptr constructVariableDIEImpl(const DbgVariable &DV, @@ -218,6 +222,17 @@ public: void addExpr(DIELoc &Die, dwarf::Form Form, const MCExpr *Expr); void applySubprogramAttributesToDefinition(DISubprogram SP, DIE &SPDie); + + /// addRangeList - Add an address range list to the list of range lists. + void addRangeList(RangeSpanList Ranges) { + CURangeLists.push_back(std::move(Ranges)); + } + + /// getRangeLists - Get the vector of range lists. + const SmallVectorImpl &getRangeLists() const { + return CURangeLists; + } + SmallVectorImpl &getRangeLists() { return CURangeLists; } }; } // end llvm namespace diff --git a/lib/CodeGen/AsmPrinter/DwarfUnit.h b/lib/CodeGen/AsmPrinter/DwarfUnit.h index ca10d1aa667..6c79dc25372 100644 --- a/lib/CodeGen/AsmPrinter/DwarfUnit.h +++ b/lib/CodeGen/AsmPrinter/DwarfUnit.h @@ -110,10 +110,6 @@ protected: // List of ranges for a given compile unit. SmallVector CURanges; - // List of range lists for a given compile unit, separate from the ranges for - // the CU itself. - SmallVector CURangeLists; - // DIEValueAllocator - All DIEValues are allocated through this allocator. BumpPtrAllocator DIEValueAllocator; @@ -157,17 +153,6 @@ public: const SmallVectorImpl &getRanges() const { return CURanges; } SmallVectorImpl &getRanges() { return CURanges; } - /// addRangeList - Add an address range list to the list of range lists. - void addRangeList(RangeSpanList Ranges) { - CURangeLists.push_back(std::move(Ranges)); - } - - /// getRangeLists - Get the vector of range lists. - const SmallVectorImpl &getRangeLists() const { - return CURangeLists; - } - SmallVectorImpl &getRangeLists() { return CURangeLists; } - /// getParentContextString - Get a string containing the language specific /// context for a global name. std::string getParentContextString(DIScope Context) const; -- 2.34.1