mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-18 09:27:27 +00:00
Don't try to get the context from an erased Instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79134 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bc037cfcde
commit
a130a511f4
@ -1311,7 +1311,7 @@ namespace {
|
||||
TerminatorInst *TI = BB->getTerminator();
|
||||
TI->replaceAllUsesWith(UndefValue::get(TI->getType()));
|
||||
TI->eraseFromParent();
|
||||
new UnreachableInst(TI->getContext(), BB);
|
||||
new UnreachableInst(BB->getContext(), BB);
|
||||
++NumBlocks;
|
||||
modified = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user