mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-07 11:33:44 +00:00
Allow for switch with no cases. Was causing fault
in gcc.dg/pr27531-1.c. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51464 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b1938263c7
commit
9bca583f9d
@ -1379,6 +1379,8 @@ bool SCCPSolver::ResolvedUndefsIn(Function &F) {
|
||||
if (!getValueState(BI->getCondition()).isUndefined())
|
||||
continue;
|
||||
} else if (SwitchInst *SI = dyn_cast<SwitchInst>(TI)) {
|
||||
if (SI->getNumSuccessors()<2) // no cases
|
||||
continue;
|
||||
if (!getValueState(SI->getCondition()).isUndefined())
|
||||
continue;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user