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

Jim Laskey jlaskey at apple.com
Fri Jan 20 17:13:30 PST 2006



Changes in directory llvm/include/llvm/CodeGen:

DwarfWriter.h updated: 1.14 -> 1.15
---
Log message:

Simplify search for abbreviations.


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

 DwarfWriter.h |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+)


Index: llvm/include/llvm/CodeGen/DwarfWriter.h
diff -u llvm/include/llvm/CodeGen/DwarfWriter.h:1.14 llvm/include/llvm/CodeGen/DwarfWriter.h:1.15
--- llvm/include/llvm/CodeGen/DwarfWriter.h:1.14	Fri Jan 20 18:59:54 2006
+++ llvm/include/llvm/CodeGen/DwarfWriter.h	Fri Jan 20 19:13:18 2006
@@ -476,6 +476,25 @@
     // Accessors
     unsigned getAttribute() const { return Attribute; }
     unsigned getForm()      const { return Form; }
+    
+    /// operator== - Used by DIEAbbrev to locate entry.
+    ///
+    bool operator==(const DIEAbbrevData &DAD) const {
+      return Attribute == DAD.Attribute && Form == DAD.Form;
+    }
+
+    /// operator!= - Used by DIEAbbrev to locate entry.
+    ///
+    bool operator!=(const DIEAbbrevData &DAD) const {
+      return Attribute != DAD.Attribute || Form != DAD.Form;
+    }
+    
+    /// operator< - Used by DIEAbbrev to locate entry.
+    ///
+    bool operator<(const DIEAbbrevData &DAD) const {
+      return Attribute < DAD.Attribute ||
+            (Attribute == DAD.Attribute && Form < DAD.Form);
+    }
   };
   
   //===--------------------------------------------------------------------===//






More information about the llvm-commits mailing list