diff options
author | Owen Anderson <resistor@mac.com> | 2010-12-18 00:07:15 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2010-12-18 00:07:15 +0000 |
commit | a479b2325635544fb2c955c4d7e8b6ea9582120f (patch) | |
tree | 04d5a0f32335c46cb014aeda4e86d7eb0425f741 /include/llvm/Support/ValueHandle.h | |
parent | 89cab93fe999f6d81b4b99a71ac797b7ecfec277 (diff) | |
download | llvm-a479b2325635544fb2c955c4d7e8b6ea9582120f.tar.gz llvm-a479b2325635544fb2c955c4d7e8b6ea9582120f.tar.bz2 llvm-a479b2325635544fb2c955c4d7e8b6ea9582120f.tar.xz |
Add support to CallbackVH to receive notification when a Value's use-list changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/ValueHandle.h')
-rw-r--r-- | include/llvm/Support/ValueHandle.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/ValueHandle.h b/include/llvm/Support/ValueHandle.h index c0cdc35e99..3fdef6b545 100644 --- a/include/llvm/Support/ValueHandle.h +++ b/include/llvm/Support/ValueHandle.h @@ -105,6 +105,7 @@ private: // Callbacks made from Value. static void ValueIsDeleted(Value *V); static void ValueIsRAUWd(Value *Old, Value *New); + static void ValueAddedUse(Use &U); // Internal implementation details. ValueHandleBase **getPrevPtr() const { return PrevPair.getPointer(); } @@ -389,6 +390,11 @@ public: /// implemented as a CallbackVH, it would use this method to call /// setValPtr(new_value). AssertingVH would do nothing in this method. virtual void allUsesReplacedWith(Value *) {} + + /// Called when a new Use is added to the use-list of this->getValPtr(), + /// after the Use has been appended to the list. Other VH kinds would ignore + /// this callback, but clients can use it to trigger re-analysis of Values. + virtual void addedUse(Use &U) {} }; // Specialize simplify_type to allow CallbackVH to participate in |