diff options
author | Chris Lattner <sabre@nondot.org> | 2006-06-21 16:53:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-06-21 16:53:47 +0000 |
commit | 70aa33ee37fede7fb84de02daa38557ffd366458 (patch) | |
tree | 9f7faee50e86f0107e468ece963a7d71e8c3cbeb /lib/VMCore/Instruction.cpp | |
parent | 0ad19703aef030ff92c7ccd28b741dc2da086e10 (diff) |
Add some out-of-line virtual dtors so that the class has a "home", preventing
vtables for (e.g.) Instruction from being emitted into every .o file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28898 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Instruction.cpp')
-rw-r--r-- | lib/VMCore/Instruction.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp index fe4ba507c1..ab4aaac745 100644 --- a/lib/VMCore/Instruction.cpp +++ b/lib/VMCore/Instruction.cpp @@ -43,6 +43,12 @@ Instruction::Instruction(const Type *ty, unsigned it, Use *Ops, unsigned NumOps, InsertAtEnd->getInstList().push_back(this); } +// Out of line virtual method, so the vtable, etc has a home. +Instruction::~Instruction() { + assert(Parent == 0 && "Instruction still linked in the program!"); +} + + void Instruction::setOpcode(unsigned opc) { setValueType(Value::InstructionVal + opc); } |