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:
parent
81fe296f15
commit
2b6906a18d
@ -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!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user