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 | a5e078b677ecfbffbaf38ed13f15bbcd78e49efe (patch) | |
tree | a2d94bc42decf795d12ff2c2f5748ff90e613f32 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | |
parent | 876387ba4ff804995cd3707af70925341c6b58b9 (diff) | |
download | bcm5719-llvm-a5e078b677ecfbffbaf38ed13f15bbcd78e49efe.tar.gz bcm5719-llvm-a5e078b677ecfbffbaf38ed13f15bbcd78e49efe.zip |
Update the MachineBasicBlock CFG for an indirect branch.
llvm-svn: 85325
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index d68d2487d32..fe95c757e62 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/llvm/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()))); |