case iro_Unknown:
nn = new_Unknown(m); break;
default:
- assert(0 && "opcode invalid or not implemented");
- nn = NULL;
- break;
+ panic("opcode invalid or not implemented");
}
return nn;
} /* copy_const_value */
{
#ifndef NDEBUG
ir_initializer_t *initializer = entity->initializer;
+ ir_type *entity_tp = get_entity_type(entity);
switch (initializer->kind) {
case IR_INITIALIZER_COMPOUND:
- assert(is_compound_entity(entity));
+ assert(is_compound_type(entity_tp));
break;
case IR_INITIALIZER_CONST:
+ /* methods are initialized by a SymConst */
+ assert(is_atomic_type(entity_tp) || is_Method_type(entity_tp));
+ break;
case IR_INITIALIZER_TARVAL:
- assert(is_atomic_entity(entity));
+ assert(is_atomic_type(entity_tp));
break;
case IR_INITIALIZER_NULL:
break;