Add support for equality comparison of CallSite's.
authorChris Lattner <sabre@nondot.org>
Sun, 13 Apr 2008 19:40:26 +0000 (19:40 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 13 Apr 2008 19:40:26 +0000 (19:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49616 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/CallSite.h

index 6a6bcf185b4664d2469e02f3db065b1df35106b3..f118680d6fc8304befd4a7c753c4770cf88aa9fe 100644 (file)
@@ -39,6 +39,9 @@ public:
   CallSite(const CallSite &CS) : I(CS.I) {}
   CallSite &operator=(const CallSite &CS) { I = CS.I; return *this; }
 
+  bool operator==(const CallSite &CS) const { return I == CS.I; }
+  bool operator!=(const CallSite &CS) const { return I != CS.I; }
+  
   /// CallSite::get - This static method is sort of like a constructor.  It will
   /// create an appropriate call site for a Call or Invoke instruction, but it
   /// can also create a null initialized CallSite object for something which is