Update the MachineBasicBlock CFG for an indirect branch.
llvm-svn: 85325
This commit is contained in:
parent
876387ba4f
commit
a5e078b677
|
@ -2132,6 +2132,10 @@ void SelectionDAGLowering::visitSwitch(SwitchInst &SI) {
|
|||
}
|
||||
|
||||
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(),
|
||||
MVT::Other, getControlRoot(),
|
||||
getValue(I.getAddress())));
|
||||
|
|
Loading…
Reference in New Issue