[cleanup] Re-sort all the includes with utils/sort_includes.py.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfUnit.h
index 370ecbf831ea37f4ab4ded25534da61a4b8204ea..82d3af2a84cfc9a0fc6686d07e3eac71f102aab5 100644 (file)
@@ -20,6 +20,7 @@
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/ADT/StringMap.h"
+#include "llvm/DIBuilder.h"
 #include "llvm/DebugInfo.h"
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCSection.h"
@@ -249,7 +250,11 @@ public:
   bool hasContent() const { return !UnitDie->getChildren().empty(); }
 
   /// addRange - Add an address range to the list of ranges for this unit.
-  void addRange(RangeSpan Range) { CURanges.push_back(Range); }
+  void addRange(RangeSpan Range) {
+    // Only add a range for this unit if we're emitting full debug.
+    if (getCUNode().getEmissionKind() == DIBuilder::FullDebug)
+      CURanges.push_back(Range);
+  }
 
   /// getRanges - Get the list of ranges for this unit.
   const SmallVectorImpl<RangeSpan> &getRanges() const { return CURanges; }
@@ -452,6 +457,9 @@ public:
   /// constructVariableDIE - Construct a DIE for the given DbgVariable.
   DIE *constructVariableDIE(DbgVariable &DV, bool isScopeAbstract);
 
+  /// constructSubprogramArguments - Construct function argument DIEs.
+  void constructSubprogramArguments(DIE &Buffer, DIArray Args);
+
   /// Create a DIE with the given Tag, add the DIE to its parent, and
   /// call insertDIE if MD is not null.
   DIE *createAndAddDIE(unsigned Tag, DIE &Parent,
@@ -565,7 +573,7 @@ public:
   /// either DW_FORM_addr or DW_FORM_GNU_addr_index.
   void addLabelAddress(DIE *Die, dwarf::Attribute Attribute, MCSymbol *Label);
 
-  DwarfCompileUnit &getCU() LLVM_OVERRIDE { return *this; }
+  DwarfCompileUnit &getCU() override { return *this; }
 };
 
 class DwarfTypeUnit : public DwarfUnit {
@@ -584,13 +592,13 @@ public:
 
   /// Emit the header for this unit, not including the initial length field.
   void emitHeader(const MCSection *ASection, const MCSymbol *ASectionSym) const
-      LLVM_OVERRIDE;
-  unsigned getHeaderSize() const LLVM_OVERRIDE {
+      override;
+  unsigned getHeaderSize() const override {
     return DwarfUnit::getHeaderSize() + sizeof(uint64_t) + // Type Signature
            sizeof(uint32_t);                               // Type DIE Offset
   }
   void initSection(const MCSection *Section);
-  DwarfCompileUnit &getCU() LLVM_OVERRIDE { return CU; }
+  DwarfCompileUnit &getCU() override { return CU; }
 };
 } // end llvm namespace
 #endif