int check_type(const ir_type *tp) { switch (get_type_opcode(tp)) { case tpo_union: case tpo_struct: case tpo_class: case tpo_segment: return check_compound_type(tp); case tpo_primitive: return check_primitive_type(tp); case tpo_pointer: return check_pointer_type(tp); case tpo_array: case tpo_method: case tpo_uninitialized: case tpo_unknown: case tpo_code: return true; } report_error("Invalid type opcode"); return false; }
int check_type(const ir_type *tp) { switch (get_type_tpop_code(tp)) { case tpo_union: case tpo_struct: case tpo_class: return check_compound_type(tp); case tpo_array: return check_array_type(tp); case tpo_primitive: return check_primitive_type(tp); case tpo_pointer: return check_pointer_type(tp); case tpo_enumeration: case tpo_method: case tpo_uninitialized: case tpo_unknown: case tpo_none: case tpo_code: break; } return true; }