Remove TextSectionSym as it is unused.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DIE.h
index e8265153f397eacd740b85933c8d0538342beb48..1655c8f1b20984e4b07678ab8358a206b32c7fc8 100644 (file)
@@ -26,6 +26,7 @@ namespace llvm {
   class MCSymbol;
   class MCSymbolRefExpr;
   class raw_ostream;
+  class DwarfTypeUnit;
 
   //===--------------------------------------------------------------------===//
   /// DIEAbbrevData - Dwarf abbreviation data, describes one attribute of a
@@ -174,7 +175,7 @@ namespace llvm {
 
     /// findAttribute - Find a value in the DIE with the attribute given,
     /// returns NULL if no such attribute exists.
-    DIEValue *findAttribute(uint16_t Attribute);
+    DIEValue *findAttribute(uint16_t Attribute) const;
 
 #ifndef NDEBUG
     void print(raw_ostream &O, unsigned IndentCount = 0) const;
@@ -195,6 +196,7 @@ namespace llvm {
       isLabel,
       isDelta,
       isEntry,
+      isTypeSignature,
       isBlock
     };
   protected:
@@ -411,6 +413,33 @@ namespace llvm {
 #endif
   };
 
+  //===--------------------------------------------------------------------===//
+  /// \brief A signature reference to a type unit.
+  class DIETypeSignature : public DIEValue {
+    const DwarfTypeUnit &Unit;
+  public:
+    explicit DIETypeSignature(const DwarfTypeUnit &Unit)
+        : DIEValue(isTypeSignature), Unit(Unit) {}
+
+    /// \brief Emit type unit signature.
+    virtual void EmitValue(AsmPrinter *Asm, dwarf::Form Form) const;
+
+    /// Returns size of a ref_sig8 entry.
+    virtual unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const {
+      assert(Form == dwarf::DW_FORM_ref_sig8);
+      return 8;
+    }
+
+    // \brief Implement isa/cast/dyncast.
+    static bool classof(const DIEValue *E) {
+      return E->getType() == isTypeSignature;
+    }
+#ifndef NDEBUG
+    virtual void print(raw_ostream &O) const;
+    void dump() const;
+#endif
+  };
+
   //===--------------------------------------------------------------------===//
   /// DIEBlock - A block of values.  Primarily used for location expressions.
   //