mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-07 11:33:44 +00:00
Update the MachineBasicBlock CFG for an indirect branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85325 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
64825153a2
commit
eef55dc3fd
@ -2132,6 +2132,10 @@ void SelectionDAGLowering::visitSwitch(SwitchInst &SI) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SelectionDAGLowering::visitIndBr(IndBrInst &I) {
|
void SelectionDAGLowering::visitIndBr(IndBrInst &I) {
|
||||||
|
// Update machine-CFG edges.
|
||||||
|
for (unsigned i = 0, e = I.getNumSuccessors(); i != e; ++i)
|
||||||
|
CurMBB->addSuccessor(FuncInfo.MBBMap[I.getSuccessor(i)]);
|
||||||
|
|
||||||
DAG.setRoot(DAG.getNode(ISD::BRIND, getCurDebugLoc(),
|
DAG.setRoot(DAG.getNode(ISD::BRIND, getCurDebugLoc(),
|
||||||
MVT::Other, getControlRoot(),
|
MVT::Other, getControlRoot(),
|
||||||
getValue(I.getAddress())));
|
getValue(I.getAddress())));
|
||||||
|
Loading…
Reference in New Issue
Block a user