From 66747cf650b8cba15c0a5cf88c0d1c1f175484df Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Mon, 24 Jul 2006 14:51:21 +0000 Subject: [PATCH] missing new_SymConst_type() constructor added [r8041] --- ir/ir/ircons.c | 17 +++++------------ ir/ir/ircons.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 12 deletions(-) diff --git a/ir/ir/ircons.c b/ir/ir/ircons.c index 7253dd545..a96404f38 100644 --- a/ir/ir/ircons.c +++ b/ir/ir/ircons.c @@ -624,16 +624,6 @@ new_bd_SymConst_type(dbg_info *db, ir_node *block, symconst_symbol value, return res; } /* new_bd_SymConst_type */ -static ir_node * -new_bd_SymConst(dbg_info *db, ir_node *block, symconst_symbol value, - symconst_kind symkind) -{ - ir_graph *irg = current_ir_graph; - - ir_node *res = new_rd_SymConst_type(db, irg, block, value, symkind, firm_unknown_type); - return res; -} /* new_bd_SymConst */ - static ir_node * new_bd_Sync(dbg_info *db, ir_node *block) { @@ -2873,8 +2863,8 @@ new_d_SymConst_type(dbg_info *db, symconst_symbol value, symconst_kind kind, ir_ ir_node * new_d_SymConst(dbg_info *db, symconst_symbol value, symconst_kind kind) { - return new_bd_SymConst(db, get_irg_start_block(current_ir_graph), - value, kind); + return new_bd_SymConst_type(db, get_irg_start_block(current_ir_graph), + value, kind, firm_unknown_type); } /* new_d_SymConst */ ir_node * @@ -3196,6 +3186,9 @@ ir_node *new_Const_type(tarval *con, ir_type *tp) { return new_d_Const_type(NULL, get_type_mode(tp), con, tp); } +ir_node *new_SymConst_type (symconst_symbol value, symconst_kind kind, ir_type *type) { + return new_d_SymConst_type(NULL, value, kind, type); +} ir_node *new_SymConst (symconst_symbol value, symconst_kind kind) { return new_d_SymConst(NULL, value, kind); } diff --git a/ir/ir/ircons.h b/ir/ir/ircons.h index 905a601ed..545e38691 100644 --- a/ir/ir/ircons.h +++ b/ir/ir/ircons.h @@ -3629,6 +3629,38 @@ ir_node *new_Const_long(ir_mode *mode, long value); * Derives mode from passed type. */ ir_node *new_Const_type(tarval *con, ir_type *tp); +/** Constructor for a SymConst node. + * + * Adds the node to the block in current_ir_block. + * This is the constructor for a symbolic constant. + * There are four kinds of symbolic constants: + * -# type_tag The symbolic constant represents a type tag. The type the + * tag stands for is given explicitly. + * -# size The symbolic constant represents the size of a type. The + * type of which the constant represents the size is given + * explicitly. + * -# align The symbolic constant represents the alignment of a type. The + * type of which the constant represents the size is given + * explicitly. + * -# addr_name The symbolic constant represents the address of an entity + * (variable or method). The variable is indicated by a name + * that is valid for linking. + * -# addr_ent The symbolic constant represents the address of an entity + * (variable or method). The variable is given explicitly by + * a firm entity. + * + * Inputs to the node: + * No inputs except the block it belongs to. + * Outputs of the node. + * An unsigned integer (I_u) or a pointer (P). + * + * @param value A type or a ident depending on the SymConst kind. + * @param kind The kind of the symbolic constant: symconst_type_tag, symconst_type_size + * symconst_type_align, symconst_addr_name or symconst_addr_ent. + * @param tp The source type of the constant. + */ +ir_node *new_SymConst_type (union symconst_symbol value, symconst_kind kind, ir_type *tp); + /** Constructor for a SymConst node. * * Adds the node to the block in current_ir_block. -- 2.20.1