mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-21 03:32:21 +00:00
Make sure to update the CFG correctly if a switch only has a default dest.
This fixes CodeGen/Generic/2006-06-12-LowerSwitchCrash.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28755 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1398421ccf
commit
a3bb86dd6b
@ -869,6 +869,7 @@ void SelectionDAGLowering::visitSwitch(SwitchInst &I) {
|
||||
if (DefaultMBB != NextBlock)
|
||||
DAG.setRoot(DAG.getNode(ISD::BR, MVT::Other, getRoot(),
|
||||
DAG.getBasicBlock(DefaultMBB)));
|
||||
CurMBB->addSuccessor(DefaultMBB);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user