// 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);
+ }
};
//===--------------------------------------------------------------------===//
if (Data.size() != DA.Data.size()) return false;
for (unsigned i = 0, N = Data.size(); i < N; i++) {
- const DIEAbbrevData &AttrData = Data[i];
- const DIEAbbrevData &DAAttrData = DA.Data[i];
- if (AttrData.getAttribute() != DAAttrData.getAttribute()) return false;
- if (AttrData.getForm() != DAAttrData.getForm()) return false;
+ if (Data[i] != DA.Data[i]) return false;
}
return true;
if (Data.size() != DA.Data.size()) return Data.size() < DA.Data.size();
for (unsigned i = 0, N = Data.size(); i < N; i++) {
- const DIEAbbrevData &AttrData = Data[i];
- const DIEAbbrevData &DAAttrData = DA.Data[i];
- if (AttrData.getAttribute() != DAAttrData.getAttribute())
- return AttrData.getAttribute() < DAAttrData.getAttribute();
- if (AttrData.getForm() != DAAttrData.getForm())
- return AttrData.getForm() < DAAttrData.getForm();
+ if (Data[i] != DA.Data[i]) return Data[i] < DA.Data[i];
}
return false;