mirror of
https://github.com/danog/ir.git
synced 2025-01-22 05:31:32 +01:00
Add check for SWITCH targets
This commit is contained in:
parent
397ed1696b
commit
211677e2c2
@ -248,6 +248,10 @@ bool ir_check(ir_ctx *ctx)
|
||||
switch (insn->op) {
|
||||
case IR_SWITCH:
|
||||
/* may have many successors */
|
||||
if (use_list->count < 1) {
|
||||
fprintf(stderr, "ir_base[%d].op (SWITCH) must have at least 1 succesor (%d)\n", i, use_list->count);
|
||||
ok = 0;
|
||||
}
|
||||
break;
|
||||
case IR_IF:
|
||||
if (use_list->count != 2) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user