mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-17 18:10:31 +00:00
Move parent assertion check before metadata deletion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82692 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
30a94e3b42
commit
f9e0a220fc
@ -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
Block a user