mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-16 00:17:32 +00:00
add more checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20296 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
83beacddc9
commit
69331f5726
@ -1815,8 +1815,12 @@ BBTerminatorInst : RET ResolvedVal { // Return with a result...
|
||||
|
||||
std::vector<std::pair<Constant*,BasicBlock*> >::iterator I = $8->begin(),
|
||||
E = $8->end();
|
||||
for (; I != E; ++I)
|
||||
S->addCase(I->first, I->second);
|
||||
for (; I != E; ++I) {
|
||||
if (ConstantInt *CI = dyn_cast<ConstantInt>(I->first))
|
||||
S->addCase(CI, I->second);
|
||||
else
|
||||
ThrowException("Switch case is constant, but not a simple integer!");
|
||||
}
|
||||
delete $8;
|
||||
}
|
||||
| SWITCH IntType ValueRef ',' LABEL ValueRef '[' ']' {
|
||||
|
Loading…
Reference in New Issue
Block a user