diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-12-09 22:46:10 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-12-09 22:46:10 +0000 |
commit | ed455c8fa25dd37a13b33f0afa66be03ac49b5bb (patch) | |
tree | 7bfa961474e22f830710a49d4ed015fe374967b7 /include/llvm/GlobalValue.h | |
parent | 46a6e79e602b23ea3478027d5bdd1f904aea7924 (diff) | |
download | llvm-ed455c8fa25dd37a13b33f0afa66be03ac49b5bb.tar.gz llvm-ed455c8fa25dd37a13b33f0afa66be03ac49b5bb.tar.bz2 llvm-ed455c8fa25dd37a13b33f0afa66be03ac49b5bb.tar.xz |
Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/GlobalValue.h')
-rw-r--r-- | include/llvm/GlobalValue.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h index fe43ed4f69..40e3a5ace5 100644 --- a/include/llvm/GlobalValue.h +++ b/include/llvm/GlobalValue.h @@ -63,11 +63,12 @@ protected: unsigned Visibility : 2; // The visibility style of this global unsigned Alignment : 16; // Alignment of this symbol, must be power of two std::string Section; // Section to emit this into, empty mean default -public: - ~GlobalValue() { - removeDeadConstantUsers(); // remove any dead constants using this. - } + static void destroyThis(GlobalValue*v) { + v->removeDeadConstantUsers(); // remove any dead constants using this. + Constant::destroyThis(v); + } +public: unsigned getAlignment() const { return Alignment; } void setAlignment(unsigned Align) { assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!"); |