[llvm] r210107 - Implement one operator== with another.

Rafael Espindola rafael.espindola at gmail.com
Tue Jun 3 08:06:23 PDT 2014


Author: rafael
Date: Tue Jun  3 10:06:22 2014
New Revision: 210107

URL: http://llvm.org/viewvc/llvm-project?rev=210107&view=rev
Log:
Implement one operator== with another.

Thanks for David Blaikie for the suggestion.

Modified:
    llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h

Modified: llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h?rev=210107&r1=210106&r2=210107&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h (original)
+++ llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h Tue Jun  3 10:06:22 2014
@@ -248,7 +248,7 @@ public:
 
   template <class T>
   bool operator==(const IntrusiveRefCntPtr<T> &A, std::nullptr_t B) {
-    return !A;
+    return B == A;
   }
 
   template <class T>





More information about the llvm-commits mailing list