1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

Move parent assertion check before metadata deletion.

llvm-svn: 82692
This commit is contained in:
Devang Patel 2009-09-24 16:19:11 +00:00
parent 81fe296f15
commit 2b6906a18d

View File

@ -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. // Out of line virtual method, so the vtable, etc has a home.
Instruction::~Instruction() { Instruction::~Instruction() {
assert(Parent == 0 && "Instruction still linked in the program!");
if (hasMetadata()) { if (hasMetadata()) {
LLVMContext &Context = getContext(); LLVMContext &Context = getContext();
Context.pImpl->TheMetadata.ValueIsDeleted(this); Context.pImpl->TheMetadata.ValueIsDeleted(this);
} }
assert(Parent == 0 && "Instruction still linked in the program!");
} }