summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/DwarfWriter.h
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-01-21 01:13:18 +0000
committerJim Laskey <jlaskey@mac.com>2006-01-21 01:13:18 +0000
commit63ae85f194981cc6493b1aeda7b8c25d34fe7e8b (patch)
tree50feaa3ed0d59da2e8a11f8239de34688dd9cc89 /include/llvm/CodeGen/DwarfWriter.h
parent736832107b64a80da1623868e7c16cb97d7ee826 (diff)
downloadllvm-63ae85f194981cc6493b1aeda7b8c25d34fe7e8b.tar.gz
llvm-63ae85f194981cc6493b1aeda7b8c25d34fe7e8b.tar.bz2
llvm-63ae85f194981cc6493b1aeda7b8c25d34fe7e8b.tar.xz
Simplify search for abbreviations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25491 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/DwarfWriter.h')
-rw-r--r--include/llvm/CodeGen/DwarfWriter.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/DwarfWriter.h b/include/llvm/CodeGen/DwarfWriter.h
index 7d04e0abcc..3c8ef877ea 100644
--- a/include/llvm/CodeGen/DwarfWriter.h
+++ b/include/llvm/CodeGen/DwarfWriter.h
@@ -476,6 +476,25 @@ namespace llvm {
// 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);
+ }
};
//===--------------------------------------------------------------------===//