Checks wheater names contains spaces (not allowed in general)
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 18 Feb 2003 10:38:27 +0000 (10:38 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 18 Feb 2003 10:38:27 +0000 (10:38 +0000)
[r807]

ir/tr/entity.c
ir/tr/type.c

index 18cea34..90ffd8f 100644 (file)
@@ -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);
index 720c37b..b664614 100644 (file)
@@ -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);