diff options
Diffstat (limited to 'include/llvm/CodeGen/DwarfWriter.h')
-rw-r--r-- | include/llvm/CodeGen/DwarfWriter.h | 19 |
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); + } }; //===--------------------------------------------------------------------===// |