Commit 481f0e33 authored by Michael Beck's avatar Michael Beck
Browse files

Checks wheater names contains spaces (not allowed in general)

[r807]
parent f55b79e6
......@@ -63,6 +63,8 @@ new_entity (type *owner, ident *name, type *type)
entity *res;
ir_graph *rem;
assert(!id_contains_char(name, ' ') && "entity name should not contain spaces");
res = (entity *) malloc (sizeof (entity));
res->kind = k_entity;
assert_legal_owner_of_ent(owner);
......
......@@ -64,6 +64,7 @@ new_type(tp_op *type_op, ir_mode *mode, ident* name) {
int node_size ;
assert(type_op != type_id);
assert(!id_contains_char(name, ' ') && "entity name should not contain spaces");
node_size = offsetof (type, attr) + type_op->attr_size;
res = (type *) xmalloc (node_size);
......
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