forked from OSchip/llvm-project
Allow for switch with no cases. Was causing fault
in gcc.dg/pr27531-1.c. llvm-svn: 51464
This commit is contained in:
parent
e3fa7136b0
commit
fecb88249f
|
@ -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