mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +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(),
|
std::vector<std::pair<Constant*,BasicBlock*> >::iterator I = $8->begin(),
|
||||||
E = $8->end();
|
E = $8->end();
|
||||||
for (; I != E; ++I)
|
for (; I != E; ++I) {
|
||||||
S->addCase(I->first, I->second);
|
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;
|
delete $8;
|
||||||
}
|
}
|
||||||
| SWITCH IntType ValueRef ',' LABEL ValueRef '[' ']' {
|
| SWITCH IntType ValueRef ',' LABEL ValueRef '[' ']' {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user