From: Michael Beck Date: Tue, 18 Feb 2003 10:38:27 +0000 (+0000) Subject: Checks wheater names contains spaces (not allowed in general) X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=481f0e33227a7745c8eceb5caa49ca941dedeccf;p=libfirm Checks wheater names contains spaces (not allowed in general) [r807] --- diff --git a/ir/tr/entity.c b/ir/tr/entity.c index 18cea3427..90ffd8fad 100644 --- a/ir/tr/entity.c +++ b/ir/tr/entity.c @@ -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); diff --git a/ir/tr/type.c b/ir/tr/type.c index 720c37bb2..b66461430 100644 --- a/ir/tr/type.c +++ b/ir/tr/type.c @@ -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);