Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
35a74825
Commit
35a74825
authored
Nov 16, 2011
by
Matthias Braun
Browse files
irverify: check that switch_table != NULL
parent
b617a959
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ir/irverify.c
View file @
35a74825
...
...
@@ -879,12 +879,15 @@ static int verify_node_Cond(const ir_node *n)
static
int
verify_switch_table
(
const
ir_node
*
n
)
{
const
ir_switch_table
*
table
=
get_Switch_table
(
n
);
size_t
n_entries
=
ir_switch_table_get_n_entries
(
table
);
unsigned
n_outs
=
get_Switch_n_outs
(
n
);
ir_node
*
selector
=
get_Switch_selector
(
n
);
ir_mode
*
mode
=
get_irn_mode
(
selector
);
size_t
n_entries
;
size_t
e
;
ASSERT_AND_RET
(
table
!=
NULL
,
"switch table is NULL"
,
0
);
n_entries
=
ir_switch_table_get_n_entries
(
table
);
for
(
e
=
0
;
e
<
n_entries
;
++
e
)
{
const
ir_switch_table_entry
*
entry
=
ir_switch_table_get_entry_const
(
table
,
e
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment