Sink range list handling down from DwarfUnit into its only use, in DwarfCompileUnit.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfCompileUnit.h
index b924d270420dd36e1e1363683268859629beff22..d193ad805f7f83b2fc3473274c7997f98a568da3 100644 (file)
@@ -48,6 +48,10 @@ class DwarfCompileUnit : public DwarfUnit {
   /// GlobalTypes - A map of globally visible types for this unit.
   StringMap<const DIE *> GlobalTypes;
 
   /// GlobalTypes - A map of globally visible types for this unit.
   StringMap<const DIE *> GlobalTypes;
 
+  // List of range lists for a given compile unit, separate from the ranges for
+  // the CU itself.
+  SmallVector<RangeSpanList, 1> CURangeLists;
+
   /// \brief Construct a DIE for the given DbgVariable without initializing the
   /// DbgVariable's DIE reference.
   std::unique_ptr<DIE> constructVariableDIEImpl(const DbgVariable &DV,
   /// \brief Construct a DIE for the given DbgVariable without initializing the
   /// DbgVariable's DIE reference.
   std::unique_ptr<DIE> 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);
   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<RangeSpanList> &getRangeLists() const {
+    return CURangeLists;
+  }
+  SmallVectorImpl<RangeSpanList> &getRangeLists() { return CURangeLists; }
 };
 
 } // end llvm namespace
 };
 
 } // end llvm namespace