Commit d8eb4a1d authored by Christoph Mallon's avatar Christoph Mallon
Browse files

irnode: Constify and reduce scope.

parent c9dbaff0
......@@ -34,7 +34,9 @@
in the in array */
#define END_KEEPALIVE_OFFSET 0
static const char *relation_names [] = {
const char *get_relation_string(ir_relation relation)
{
static char const *const relation_names[] = {
"false",
"equal",
"less",
......@@ -51,11 +53,9 @@ static const char *relation_names [] = {
"unordered_greater_equal",
"not_equal",
"true"
};
};
const char *get_relation_string(ir_relation relation)
{
assert(relation < (ir_relation)ARRAY_SIZE(relation_names));
assert((size_t)relation < ARRAY_SIZE(relation_names));
return relation_names[relation];
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment