diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-12-10 02:14:30 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-12-10 02:14:30 +0000 |
commit | 14a5569f4ee2808b8d3f1ce2b3b022a8bf660874 (patch) | |
tree | e4f52be74838e7d49e82a9308e2c51b2aa48e227 /llvm/lib/VMCore/Function.cpp | |
parent | 3fbe73bef2247972615298fdc48a9d07460a2546 (diff) | |
download | bcm5719-llvm-14a5569f4ee2808b8d3f1ce2b3b022a8bf660874.tar.gz bcm5719-llvm-14a5569f4ee2808b8d3f1ce2b3b022a8bf660874.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
llvm-svn: 44760
Diffstat (limited to 'llvm/lib/VMCore/Function.cpp')
-rw-r--r-- | llvm/lib/VMCore/Function.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp index b1405e59262..04db3aa06c3 100644 --- a/llvm/lib/VMCore/Function.cpp +++ b/llvm/lib/VMCore/Function.cpp @@ -287,17 +287,16 @@ Function::Function(const FunctionType *Ty, LinkageTypes Linkage, ParentModule->getFunctionList().push_back(this); } -void Function::destroyThis(Function*v) { - v->dropAllReferences(); // After this it is safe to delete instructions. +Function::~Function() { + dropAllReferences(); // After this it is safe to delete instructions. // Delete all of the method arguments and unlink from symbol table... - v->ArgumentList.clear(); - delete v->SymTab; + ArgumentList.clear(); + delete SymTab; // Drop our reference to the parameter attributes, if any. - if (v->ParamAttrs) - v->ParamAttrs->dropRef(); - GlobalValue::destroyThis(v); + if (ParamAttrs) + ParamAttrs->dropRef(); } void Function::BuildLazyArguments() const { |