summaryrefslogtreecommitdiff
path: root/include/llvm/Support/ValueHandle.h
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-05-19 19:15:25 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-05-19 19:15:25 +0000
commit4e4c3408a5a1cc72b739a4b448329a281c379c55 (patch)
treed98d4eaedae57fc8777978df89f4fede575ef81d /include/llvm/Support/ValueHandle.h
parent5084c6b0a29ed409092bd31cd75849312a73bee5 (diff)
downloadllvm-4e4c3408a5a1cc72b739a4b448329a281c379c55.tar.gz
llvm-4e4c3408a5a1cc72b739a4b448329a281c379c55.tar.bz2
llvm-4e4c3408a5a1cc72b739a4b448329a281c379c55.tar.xz
Move CallbackVHs dtor inline, it can be devirtualized in many cases. Move the other virtual methods out of line as they are only called from within Value.cpp anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/ValueHandle.h')
-rw-r--r--include/llvm/Support/ValueHandle.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/llvm/Support/ValueHandle.h b/include/llvm/Support/ValueHandle.h
index b7210b2063..6787633c1d 100644
--- a/include/llvm/Support/ValueHandle.h
+++ b/include/llvm/Support/ValueHandle.h
@@ -367,7 +367,7 @@ protected:
CallbackVH(const CallbackVH &RHS)
: ValueHandleBase(Callback, RHS) {}
- virtual ~CallbackVH();
+ virtual ~CallbackVH() {}
void setValPtr(Value *P) {
ValueHandleBase::operator=(P);
@@ -389,15 +389,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