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

Jim Laskey jlaskey at apple.com
Fri Jan 27 07:21:07 PST 2006



Changes in directory llvm/include/llvm/CodeGen:

DwarfWriter.h updated: 1.19 -> 1.20
MachineDebugInfo.h updated: 1.8 -> 1.9
---
Log message:

Improve visibility/correctness of operand indices in "llvm.db" objects.
Handle 64 in DIEs.


---
Diffs of the changes:  (+39 -5)

 DwarfWriter.h      |   17 ++++++++++++-----
 MachineDebugInfo.h |   27 +++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 5 deletions(-)


Index: llvm/include/llvm/CodeGen/DwarfWriter.h
diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.19 llvm/include/llvm/CodeGen/DwarfWriter.h:1.20
--- llvm/include/llvm/CodeGen/DwarfWriter.h:1.19	Thu Jan 26 16:25:04 2006
+++ llvm/include/llvm/CodeGen/DwarfWriter.h	Fri Jan 27 09:20:54 2006
@@ -176,10 +176,10 @@
   // 
   class DIEInteger : public DIEValue {
   private:
-    int Integer;
+    uint64_t Integer;
     
   public:
-    DIEInteger(int I) : DIEValue(isInteger), Integer(I) {}
+    DIEInteger(uint64_t I) : DIEValue(isInteger), Integer(I) {}
 
     // Implement isa/cast/dyncast.
     static bool classof(const DIEInteger *) { return true; }
@@ -334,10 +334,13 @@
     /// sibling.
     unsigned SiblingOffset() const { return Offset + Size; }
 
-    /// AddInt - Add a simple integer attribute data and value.
+    /// AddUInt - Add an unsigned integer attribute data and value.
     ///
-    void AddInt(unsigned Attribute, unsigned Form,
-                int Integer, bool IsSigned = false);
+    void AddUInt(unsigned Attribute, unsigned Form, uint64_t Integer);
+
+    /// AddSInt - Add an signed integer attribute data and value.
+    ///
+    void AddSInt(unsigned Attribute, unsigned Form, int64_t Integer);
         
     /// AddString - Add a std::string attribute data and value.
     ///
@@ -586,6 +589,10 @@
     ///
     void EmitLong(int Value) const;
     
+    /// EmitLongLong - Emit a long long directive and value.
+    ///
+    void EmitLongLong(uint64_t Value) const;
+    
     /// EmitString - Emit a string with quotes and a null terminator.
     /// Special characters are emitted properly. (Eg. '\t')
     void EmitString(const std::string &String) const;


Index: llvm/include/llvm/CodeGen/MachineDebugInfo.h
diff -u llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.8 llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.9
--- llvm/include/llvm/CodeGen/MachineDebugInfo.h:1.8	Thu Jan 26 15:22:49 2006
+++ llvm/include/llvm/CodeGen/MachineDebugInfo.h	Fri Jan 27 09:20:54 2006
@@ -73,6 +73,19 @@
 /// CompileUnitWrapper - This class wraps a "lldb.compile_unit" global to
 /// provide easy access to its attributes.
 class CompileUnitWrapper : public DebugInfoWrapper {
+private:
+  // Operand indices.
+  enum {
+    Tag_op,
+    Version_op,
+    Language_op,
+    FileName_op,
+    Directory_op,
+    Producer_op,
+    Anchor_op, // ignored
+    N_op
+  };
+  
 public:
   CompileUnitWrapper(GlobalVariable *G);
   
@@ -110,6 +123,20 @@
 /// GlobalWrapper - This class wraps a "lldb.global" global to provide easy
 /// access to its attributes.
 class GlobalWrapper : public DebugInfoWrapper {
+private:
+  // Operand indices.
+  enum {
+    Tag_op,
+    Context_op,
+    Name_op,
+    Anchor_op, // ignored
+    Type_op,
+    Static_op,
+    Definition_op,
+    GlobalVariable_op,
+    N_op
+  };
+  
 public:
   GlobalWrapper(GlobalVariable *G);
   






More information about the llvm-commits mailing list