diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-05-19 19:15:25 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-05-19 19:15:25 +0000 |
commit | 4e4c3408a5a1cc72b739a4b448329a281c379c55 (patch) | |
tree | d98d4eaedae57fc8777978df89f4fede575ef81d /lib/VMCore | |
parent | 5084c6b0a29ed409092bd31cd75849312a73bee5 (diff) | |
download | external_llvm-4e4c3408a5a1cc72b739a4b448329a281c379c55.zip external_llvm-4e4c3408a5a1cc72b739a4b448329a281c379c55.tar.gz external_llvm-4e4c3408a5a1cc72b739a4b448329a281c379c55.tar.bz2 |
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 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Value.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp index 4006b2c..d871108 100644 --- a/lib/VMCore/Value.cpp +++ b/lib/VMCore/Value.cpp @@ -686,6 +686,9 @@ void ValueHandleBase::ValueIsRAUWd(Value *Old, Value *New) { #endif } -/// ~CallbackVH. Empty, but defined here to avoid emitting the vtable -/// more than once. -CallbackVH::~CallbackVH() {} +// Default implementation for CallbackVH. +void CallbackVH::allUsesReplacedWith(Value *) {} + +void CallbackVH::deleted() { + setValPtr(NULL); +} |