summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/ADT/IntrusiveRefCntPtr.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h b/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
index cd1946c54d4..295c96315a5 100644
--- a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
+++ b/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h
@@ -177,10 +177,7 @@ public:
T* getPtr() const { return Obj; }
- typedef T* (IntrusiveRefCntPtr::*unspecified_bool_type) () const;
- operator unspecified_bool_type() const {
- return Obj ? &IntrusiveRefCntPtr::getPtr : nullptr;
- }
+ LLVM_EXPLICIT operator bool() const { return Obj; }
void swap(IntrusiveRefCntPtr& other) {
T* tmp = other.Obj;
OpenPOWER on IntegriCloud