diff options
author | Dan Gohman <gohman@apple.com> | 2009-10-27 22:10:34 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-10-27 22:10:34 +0000 |
commit | eef55dc3fdebf915128e5d3848f372c7db6c38e8 (patch) | |
tree | 4a20585f2e34ab70e922ac58acb17f9c486fbdbc /lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | |
parent | 64825153a219b40bcdb79861fb6ac4fd8eadd616 (diff) |
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
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index d68d2487d3..fe95c757e6 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -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()))); |