diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp index 5cb1040e4bc..4df536e68b4 100644 --- a/lib/VMCore/Instruction.cpp +++ b/lib/VMCore/Instruction.cpp @@ -50,11 +50,11 @@ Instruction::Instruction(const Type *ty, unsigned it, Use *Ops, unsigned NumOps, // Out of line virtual method, so the vtable, etc has a home. Instruction::~Instruction() { + assert(Parent == 0 && "Instruction still linked in the program!"); if (hasMetadata()) { LLVMContext &Context = getContext(); Context.pImpl->TheMetadata.ValueIsDeleted(this); } - assert(Parent == 0 && "Instruction still linked in the program!"); }