diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-03-01 23:52:37 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-03-01 23:52:37 +0000 |
commit | 6a3eb01084ff5fe0eee64a66cd050d86a38579c7 (patch) | |
tree | 9f7e4dbe282b0b85ec62f6f9f10ef1b805addd60 /include/llvm/CodeGen/MachineDebugInfo.h | |
parent | 5df594069342a75a1f83a5c351adbd2e7abd51ea (diff) |
Support for enumerations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26466 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineDebugInfo.h')
-rw-r--r-- | include/llvm/CodeGen/MachineDebugInfo.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineDebugInfo.h b/include/llvm/CodeGen/MachineDebugInfo.h index d9d76fae2a..099cd03a9c 100644 --- a/include/llvm/CodeGen/MachineDebugInfo.h +++ b/include/llvm/CodeGen/MachineDebugInfo.h @@ -447,6 +447,44 @@ public: }; //===----------------------------------------------------------------------===// +/// 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 +}; + +//===----------------------------------------------------------------------===// /// GlobalDesc - This class is the base descriptor for global functions and /// variables. class GlobalDesc : public AnchoredDesc { |