add a converting operator
authorChris Lattner <sabre@nondot.org>
Tue, 31 Mar 2009 23:09:51 +0000 (23:09 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 31 Mar 2009 23:09:51 +0000 (23:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68158 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/ValueHandle.h

index 0494b27019cf697612fb522f0634110dae8a8809..3cf964d01163b80b1ed22ce947bad70a0b2258d5 100644 (file)
@@ -123,6 +123,9 @@ public:
   WeakVH(const WeakVH &RHS)
     : ValueHandleBase(Weak, RHS) {}
 
+  operator Value*() const {
+    return getValPtr();
+  }
 };  
   
 /// AssertingVH - This is a Value Handle that points to a value and asserts out