diff options
Diffstat (limited to 'lib/VMCore/Value.cpp')
-rw-r--r-- | lib/VMCore/Value.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index af3f4e7078..35c8ccfae6 100644 --- a/lib/VMCore/Value.cpp +++ b/lib/VMCore/Value.cpp @@ -511,7 +511,9 @@ void ValueHandleBase::ValueIsDeleted(Value *V) { ThisNode->operator=(0); break; case Callback: - assert(0 && "Callback not implemented yet!"); + // Forward to the subclass's implementation. + static_cast<CallbackVH*>(ThisNode)->deleted(); + break; } } @@ -543,11 +545,17 @@ void ValueHandleBase::ValueIsRAUWd(Value *Old, Value *New) { ThisNode->operator=(New); break; case Callback: - assert(0 && "Callback not implemented yet!"); + // Forward to the subclass's implementation. + static_cast<CallbackVH*>(ThisNode)->allUsesReplacedWith(New); + break; } } } +/// ~CallbackVH. Empty, but defined here to avoid emitting the vtable +/// more than once. +CallbackVH::~CallbackVH() {} + //===----------------------------------------------------------------------===// // User Class |