mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-04 03:17:51 +00:00
Don't delete one more instruction than we're allowed to. This should fix the
Darwin bootstrap. Testcase exists but isn't fully reduced, I expect to commit the testcase this evening. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160693 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9669f74976
commit
952f5d562c
@ -442,12 +442,14 @@ static bool CleanupPointerRootUsers(GlobalVariable *GV) {
|
||||
Dead[i].second->eraseFromParent();
|
||||
Instruction *I = Dead[i].first;
|
||||
do {
|
||||
if (isAllocationFn(I))
|
||||
break;
|
||||
Instruction *J = dyn_cast<Instruction>(I->getOperand(0));
|
||||
if (!J)
|
||||
break;
|
||||
I->eraseFromParent();
|
||||
I = J;
|
||||
} while (!isAllocationFn(I));
|
||||
} while (1);
|
||||
I->eraseFromParent();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user