aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Instruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Instruction.cpp')
-rw-r--r--lib/VMCore/Instruction.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp
index fe4ba50..ab4aaac 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);
}