summaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/ValueHandle.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/ValueHandle.h')
-rw-r--r--include/llvm/Support/ValueHandle.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/llvm/Support/ValueHandle.h b/include/llvm/Support/ValueHandle.h
index b7210b2..61e21b8 100644
--- a/include/llvm/Support/ValueHandle.h
+++ b/include/llvm/Support/ValueHandle.h
@@ -110,11 +110,12 @@ protected:
V != DenseMapInfo<Value *>::getTombstoneKey();
}
-private:
+public:
// Callbacks made from Value.
static void ValueIsDeleted(Value *V);
static void ValueIsRAUWd(Value *Old, Value *New);
+private:
// Internal implementation details.
ValueHandleBase **getPrevPtr() const { return PrevPair.getPointer(); }
HandleBaseKind getKind() const { return PrevPair.getInt(); }
@@ -367,7 +368,7 @@ protected:
CallbackVH(const CallbackVH &RHS)
: ValueHandleBase(Callback, RHS) {}
- virtual ~CallbackVH();
+ virtual ~CallbackVH() {}
void setValPtr(Value *P) {
ValueHandleBase::operator=(P);
@@ -389,15 +390,13 @@ public:
///
/// All implementations must remove the reference from this object to the
/// Value that's being destroyed.
- virtual void deleted() {
- setValPtr(NULL);
- }
+ virtual void deleted();
/// Called when this->getValPtr()->replaceAllUsesWith(new_value) is called,
/// _before_ any of the uses have actually been replaced. If WeakVH were
/// 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 *) {}
+ virtual void allUsesReplacedWith(Value *);
};
// Specialize simplify_type to allow CallbackVH to participate in
OpenPOWER on IntegriCloud