{
ir_node *res;
+ assert(is_atomic_type(to_tp));
+
res = new_ir_node(db, irg, block, op_Cast, get_irn_mode(op), 1, &op);
res->attr.cast.totype = to_tp;
res = optimize_node(res);
res = new_ir_node(db, irg, block, op_Call, mode_T, r_arity, r_in);
- assert(is_method_type(tp));
+ assert((get_unknown_type() == tp) || is_method_type(tp));
set_Call_type(res, tp);
res->attr.call.exc.pin_state = op_pin_state_pinned;
res->attr.call.callee_arr = NULL;
INLINE ir_node *
new_rd_SymConst_type (dbg_info* db, ir_graph *irg, ir_node *block, symconst_symbol value,
- symconst_kind symkind, type *tp)
-{
+ symconst_kind symkind, type *tp) {
ir_node *res;
ir_mode *mode;
mode = mode_P_mach;
else
mode = mode_Iu;
+
res = new_ir_node(db, irg, block, op_SymConst, mode, 0, NULL);
res->attr.i.num = symkind;
ir_node *new_Const (ir_mode *mode, tarval *con) {
return new_d_Const(NULL, mode, con);
}
+
+ir_node *new_Const_type(tarval *con, type *tp) {
+ return new_d_Const_type(NULL, get_type_mode(tp), con, tp);
+}
+
ir_node *new_SymConst (symconst_symbol value, symconst_kind kind) {
return new_d_SymConst(NULL, value, kind);
}