From afba8fe662d65b25b4baf46bb26cc18e1f9cc0a5 Mon Sep 17 00:00:00 2001 From: Gordon Henriksen Date: Mon, 10 Dec 2007 02:14:30 +0000 Subject: 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 --- include/llvm/Instruction.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/llvm/Instruction.h') diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h index 3875cbe3b1..8da89e2f38 100644 --- a/include/llvm/Instruction.h +++ b/include/llvm/Instruction.h @@ -42,10 +42,10 @@ protected: Instruction *InsertBefore = 0); Instruction(const Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, BasicBlock *InsertAtEnd); - - static void destroyThis(Instruction*v); - friend class Value; public: + // Out of line virtual method, so the vtable, etc has a home. + ~Instruction(); + /// mayWriteToMemory - Return true if this instruction may modify memory. /// bool mayWriteToMemory() const; -- cgit v1.2.3