Remove the bitwise XOR operator from the Attributes class. Replace it with the equiva...
[oota-llvm.git] / include / llvm / Attributes.h
index ce477c8aeb194130fed9d0c4325a0ab48a3fccc4..c8f723a7dcffe43c3129bb1ea3df12d351a5920f 100644 (file)
@@ -131,7 +131,7 @@ public:
     /// a power of 2) into the form used internally in Attributes.
     Builder &addStackAlignmentAttr(unsigned Align);
 
-    void removeAttributes(const Attributes &A);
+    Builder &removeAttributes(const Attributes &A);
 
     /// @brief Remove attributes that are used on functions only.
     void removeFunctionOnlyAttrs() {
@@ -154,6 +154,13 @@ public:
         .removeAttribute(Attributes::ReturnsTwice)
         .removeAttribute(Attributes::AddressSafety);
     }
+
+    bool operator==(const Builder &B) {
+      return Bits == B.Bits;
+    }
+    bool operator!=(const Builder &B) {
+      return Bits != B.Bits;
+    }
   };
 
   /// get - Return a uniquified Attributes object. This takes the uniquified
@@ -229,10 +236,8 @@ public:
 
   Attributes operator | (const Attributes &A) const;
   Attributes operator & (const Attributes &A) const;
-  Attributes operator ^ (const Attributes &A) const;
   Attributes &operator |= (const Attributes &A);
   Attributes &operator &= (const Attributes &A);
-  Attributes operator ~ () const;
 
   uint64_t Raw() const;
 
@@ -351,7 +356,7 @@ public:
   /// removeAttr - Remove the specified attribute at the specified index from
   /// this attribute list.  Since attribute lists are immutable, this
   /// returns the new list.
-  AttrListPtr removeAttr(unsigned Idx, Attributes Attrs) const;
+  AttrListPtr removeAttr(LLVMContext &C, unsigned Idx, Attributes Attrs) const;
 
   //===--------------------------------------------------------------------===//
   // Attribute List Accessors