forked from OSchip/llvm-project
Move parent assertion check before metadata deletion.
llvm-svn: 82692
This commit is contained in:
parent
f95a450ef9
commit
4e6f2e46e8
|
@ -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!");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue