mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 17:25:21 +00:00
Revert r55859. This is breaking the build in the abscence of its companion commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55865 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -222,10 +222,13 @@ void PruneEH::DeleteBasicBlock(BasicBlock *BB) {
|
||||
CallGraphNode *CGN = CG[BB->getParent()];
|
||||
for (BasicBlock::iterator I = BB->end(), E = BB->begin(); I != E; ) {
|
||||
--I;
|
||||
if (CallInst *CI = dyn_cast<CallInst>(I))
|
||||
CGN->removeCallEdgeFor(CI);
|
||||
else if (InvokeInst *II = dyn_cast<InvokeInst>(I))
|
||||
CGN->removeCallEdgeFor(II);
|
||||
if (CallInst *CI = dyn_cast<CallInst>(I)) {
|
||||
if (Function *Callee = CI->getCalledFunction())
|
||||
CGN->removeCallEdgeTo(CG[Callee]);
|
||||
} else if (InvokeInst *II = dyn_cast<InvokeInst>(I)) {
|
||||
if (Function *Callee = II->getCalledFunction())
|
||||
CGN->removeCallEdgeTo(CG[Callee]);
|
||||
}
|
||||
if (!I->use_empty())
|
||||
I->replaceAllUsesWith(UndefValue::get(I->getType()));
|
||||
}
|
||||
|
Reference in New Issue
Block a user