aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/GlobalValue.h
diff options
context:
space:
mode:
authorGordon Henriksen <gordonhenriksen@mac.com>2007-12-10 02:14:30 +0000
committerGordon Henriksen <gordonhenriksen@mac.com>2007-12-10 02:14:30 +0000
commitafba8fe662d65b25b4baf46bb26cc18e1f9cc0a5 (patch)
tree90d674eca01d05d52bdd394518dd2bc76db5c154 /include/llvm/GlobalValue.h
parent65b211807d524d50d8bb3429a4c5049fb2d3d3ac (diff)
downloadexternal_llvm-afba8fe662d65b25b4baf46bb26cc18e1f9cc0a5.tar.gz
external_llvm-afba8fe662d65b25b4baf46bb26cc18e1f9cc0a5.tar.bz2
external_llvm-afba8fe662d65b25b4baf46bb26cc18e1f9cc0a5.zip
Reverting dtor devirtualization patch.
_sabre_: it has a major problem: by the time ~Value is run, all of the "parts" of the derived classes have been destroyed _sabre_: the vtable lives to fight another day git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/GlobalValue.h')
-rw-r--r--include/llvm/GlobalValue.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h
index 40e3a5ace5..fe43ed4f69 100644
--- a/include/llvm/GlobalValue.h
+++ b/include/llvm/GlobalValue.h
@@ -63,12 +63,11 @@ 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
-
- static void destroyThis(GlobalValue*v) {
- v->removeDeadConstantUsers(); // remove any dead constants using this.
- Constant::destroyThis(v);
- }
public:
+ ~GlobalValue() {
+ removeDeadConstantUsers(); // remove any dead constants using this.
+ }
+
unsigned getAlignment() const { return Alignment; }
void setAlignment(unsigned Align) {
assert((Align & (Align-1)) == 0 && "Alignment is not a power of 2!");