[llvm] r318162 - Add missing const qualifier to AttributeSet::operator==

Serge Guelton via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 10:08:05 PST 2017


Author: serge_sans_paille
Date: Tue Nov 14 10:08:05 2017
New Revision: 318162

URL: http://llvm.org/viewvc/llvm-project?rev=318162&view=rev
Log:
Add missing const qualifier to AttributeSet::operator==


Modified:
    llvm/trunk/include/llvm/IR/Attributes.h

Modified: llvm/trunk/include/llvm/IR/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Attributes.h?rev=318162&r1=318161&r2=318162&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Attributes.h (original)
+++ llvm/trunk/include/llvm/IR/Attributes.h Tue Nov 14 10:08:05 2017
@@ -225,8 +225,8 @@ public:
   static AttributeSet get(LLVMContext &C, const AttrBuilder &B);
   static AttributeSet get(LLVMContext &C, ArrayRef<Attribute> Attrs);
 
-  bool operator==(const AttributeSet &O) { return SetNode == O.SetNode; }
-  bool operator!=(const AttributeSet &O) { return !(*this == O); }
+  bool operator==(const AttributeSet &O) const { return SetNode == O.SetNode; }
+  bool operator!=(const AttributeSet &O) const { return !(*this == O); }
 
   /// Add an argument attribute. Returns a new set because attribute sets are
   /// immutable.




More information about the llvm-commits mailing list