[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineDebugInfo.h

Jim Laskey jlaskey at apple.com
Wed Mar 1 15:52:51 PST 2006



Changes in directory llvm/include/llvm/CodeGen:

MachineDebugInfo.h updated: 1.25 -> 1.26
---
Log message:

Support for enumerations.


---
Diffs of the changes:  (+38 -0)

 MachineDebugInfo.h |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+)


Index: llvm/include/llvm/CodeGen/MachineDebugInfo.h
diff -u llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.25 llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.26
--- llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.25	Wed Mar  1 14:49:44 2006
+++ llvm/include/llvm/CodeGen/MachineDebugInfo.h	Wed Mar  1 17:52:37 2006
@@ -447,6 +447,44 @@
 };
 
 //===----------------------------------------------------------------------===//
+/// 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 {






More information about the llvm-commits mailing list