+ /// getDescString - Return a string used to compose global names and labels.
+ ///
+ virtual const char *getDescString() const;
+
+ /// getTypeString - Return a string used to label this descriptor's type.
+ ///
+ virtual const char *getTypeString() const;
+
+#ifndef NDEBUG
+ virtual void dump();
+#endif
+};
+
+//===----------------------------------------------------------------------===//
+/// CompositeTypeDesc - This class packages debug information associated with a
+/// array/struct types (eg., arrays, struct, union, enums.)
+class CompositeTypeDesc : public DerivedTypeDesc {
+private:
+ bool IsVector; // packed/vector array
+ std::vector<DebugInfoDesc *> Elements;// Information used to compose type.
+
+public:
+ CompositeTypeDesc(unsigned T);
+
+ // Accessors
+ bool isVector() const { return IsVector; }
+ std::vector<DebugInfoDesc *> &getElements() { return Elements; }
+ void setIsVector() { IsVector = true; }
+
+ // Implement isa/cast/dyncast.
+ static bool classof(const CompositeTypeDesc *) { return true; }
+ static bool classof(const DebugInfoDesc *D);
+
+ /// ApplyToFields - Target the visitor to the fields of the CompositeTypeDesc.
+ ///
+ virtual void ApplyToFields(DIVisitor *Visitor);
+
+ /// getDescString - Return a string used to compose global names and labels.
+ ///
+ virtual const char *getDescString() const;
+
+ /// getTypeString - Return a string used to label this descriptor's type.
+ ///
+ virtual const char *getTypeString() const;
+
+#ifndef NDEBUG
+ virtual void dump();
+#endif
+};
+
+//===----------------------------------------------------------------------===//
+/// SubrangeDesc - This class packages debug information associated with integer
+/// value ranges.
+class SubrangeDesc : public DebugInfoDesc {
+private:
+ int64_t Lo; // Low value of range.
+ int64_t Hi; // High value of range.
+
+public:
+ SubrangeDesc();
+
+ // Accessors
+ int64_t getLo() const { return Lo; }
+ int64_t getHi() const { return Hi; }
+ void setLo(int64_t L) { Lo = L; }
+ void setHi(int64_t H) { Hi = H; }
+
+ // Implement isa/cast/dyncast.
+ static bool classof(const SubrangeDesc *) { return true; }
+ static bool classof(const DebugInfoDesc *D);
+
+ /// ApplyToFields - Target the visitor to the fields of the SubrangeDesc.
+ ///
+ virtual void ApplyToFields(DIVisitor *Visitor);
+
+ /// getDescString - Return a string used to compose global names and labels.
+ ///
+ virtual const char *getDescString() const;
+
+ /// getTypeString - Return a string used to label this descriptor's type.
+ ///
+ virtual const char *getTypeString() const;
+
+#ifndef NDEBUG
+ virtual void dump();
+#endif
+};
+
+//===----------------------------------------------------------------------===//
+/// EnumeratorDesc - This class packages debug information associated with
+/// named integer constants.
+class EnumeratorDesc : public DebugInfoDesc {
+private:
+ std::string Name; // Enumerator name.
+ int64_t Value; // Enumerator value.
+
+public:
+ EnumeratorDesc();
+
+ // Accessors
+ const std::string &getName() const { return Name; }
+ int64_t getValue() const { return Value; }
+ void setName(const std::string &N) { Name = N; }
+ void setValue(int64_t V) { Value = V; }
+
+ // Implement isa/cast/dyncast.
+ static bool classof(const EnumeratorDesc *) { return true; }
+ static bool classof(const DebugInfoDesc *D);
+
+ /// ApplyToFields - Target the visitor to the fields of the EnumeratorDesc.
+ ///
+ virtual void ApplyToFields(DIVisitor *Visitor);
+
+ /// getDescString - Return a string used to compose global names and labels.
+ ///
+ virtual const char *getDescString() const;
+
+ /// getTypeString - Return a string used to label this descriptor's type.
+ ///
+ virtual const char *getTypeString() const;
+
+#ifndef NDEBUG
+ virtual void dump();
+#endif
+};
+
+//===----------------------------------------------------------------------===//
+/// VariableDesc - This class packages debug information associated with a
+/// subprogram variable.
+///
+class VariableDesc : public DebugInfoDesc {
+private:
+ DebugInfoDesc *Context; // Context debug descriptor.
+ std::string Name; // Type name (may be empty.)
+ CompileUnitDesc *File; // Defined compile unit (may be NULL.)
+ unsigned Line; // Defined line# (may be zero.)
+ TypeDesc *TyDesc; // Type of variable.
+
+public:
+ VariableDesc(unsigned T);
+
+ // Accessors
+ DebugInfoDesc *getContext() const { return Context; }
+ const std::string &getName() const { return Name; }
+ CompileUnitDesc *getFile() const { return File; }
+ unsigned getLine() const { return Line; }
+ TypeDesc *getType() const { return TyDesc; }
+ void setContext(DebugInfoDesc *C) { Context = C; }
+ void setName(const std::string &N) { Name = N; }
+ void setFile(CompileUnitDesc *U) { File = U; }
+ void setLine(unsigned L) { Line = L; }
+ void setType(TypeDesc *T) { TyDesc = T; }
+
+ // Implement isa/cast/dyncast.
+ static bool classof(const VariableDesc *) { return true; }
+ static bool classof(const DebugInfoDesc *D);
+
+ /// ApplyToFields - Target the visitor to the fields of the VariableDesc.
+ ///
+ virtual void ApplyToFields(DIVisitor *Visitor);
+
+ /// getDescString - Return a string used to compose global names and labels.
+ ///
+ virtual const char *getDescString() const;
+
+ /// getTypeString - Return a string used to label this descriptor's type.
+ ///
+ virtual const char *getTypeString() const;
+