* SymConst. The content of the attribute symconst_symbol depends on this tag.
* Use the proper access routine after testing this flag. */
typedef enum symconst_kind {
- symconst_type_tag, /**< The SymConst is a type tag for the given type.
- symconst_symbol is type *. */
symconst_type_size, /**< The SymConst is the size of the given type.
symconst_symbol is type *. */
symconst_type_align, /**< The SymConst is the alignment of the given type.
* -----------------------------------------------------------------------------------------
*
* There are several symbolic constants:
- * symconst_type_tag The symbolic constant represents a type tag.
* symconst_type_size The symbolic constant represents the size of a type.
* symconst_type_align The symbolic constant represents the alignment of a type.
* symconst_addr_ent The symbolic constant represents the address of an entity.
*
* Attributes:
* attr.i.num The symconst_addr_ent, i.e. one of
- * -symconst_type_tag
* -symconst_type_size
* -symconst_type_align
* -symconst_addr_ent
*
- * If the attr.i.num is symconst_type_tag, symconst_type_size or symconst_type_align,
+ * If the attr.i.num is symconst_type_size or symconst_type_align,
* the node contains an attribute:
*
* attr.i.*type, a pointer to a type_class.
*
* This is the constructor for a symbolic constant.
* There are several kinds of symbolic constants:
- * - symconst_type_tag The symbolic constant represents a type tag. The
- * type the tag stands for is given explicitly.
* - symconst_type_size The symbolic constant represents the size of a type.
* The type of which the constant represents the size
* is given explicitly.
FIRM_API ir_node *new_rd_SymConst_ofs_ent(dbg_info *db, ir_graph *irg,
ir_mode *mode, ir_entity *symbol);
-/** Constructor for a SymConst type_tag node.
- *
- * Same as new_rd_SymConst, except that the constructor is tailored for
- * symconst_type_tag.
- * Adds the SymConst to the start block of irg.
- */
-FIRM_API ir_node *new_rd_SymConst_type_tag(dbg_info *db, ir_graph *irg,
- ir_mode *mode, ir_type *symbol);
-
/** Constructor for a SymConst size node.
*
* Same as new_rd_SymConst, except that the constructor is tailored for
*
* This is the constructor for a symbolic constant.
* There are several kinds of symbolic constants:
- * - symconst_type_tag The symbolic constant represents a type tag. The
- * type the tag stands for is given explicitly.
* - symconst_type_size The symbolic constant represents the size of a type.
* The type of which the constant represents the size
* is given explicitly.
*
* This is the constructor for a symbolic constant.
* There are several kinds of symbolic constants:
- * - symconst_type_tag The symbolic constant represents a type tag. The
- * type the tag stands for is given explicitly.
* - symconst_type_size The symbolic constant represents the size of a type.
* The type of which the constant represents the size
* is given explicitly.
*
* This is the constructor for a symbolic constant.
* There are several kinds of symbolic constants:
- * - symconst_type_tag The symbolic constant represents a type tag. The
- * type the tag stands for is given explicitly.
* - symconst_type_size The symbolic constant represents the size of a type.
* The type of which the constant represents the size
* is given explicitly.
/** Set the kind of the SymConst. */
FIRM_API void set_SymConst_kind(ir_node *node, symconst_kind num);
-/** Only to access SymConst of kind type_tag or size. Else assertion: */
+/** Only to access SymConst of kind type_size. Else assertion: */
FIRM_API ir_type *get_SymConst_type(const ir_node *node);
FIRM_API void set_SymConst_type(ir_node *node, ir_type *tp);
return new_rd_SymConst(db, irg, mode, sym, symconst_ofs_ent);
}
-ir_node *new_rd_SymConst_type_tag(dbg_info *db, ir_graph *irg, ir_mode *mode, ir_type *symbol)
-{
- symconst_symbol sym;
- sym.type_p = symbol;
- return new_rd_SymConst(db, irg, mode, sym, symconst_type_tag);
-}
-
ir_node *new_rd_SymConst_size(dbg_info *db, ir_graph *irg, ir_mode *mode, ir_type *symbol)
{
symconst_symbol sym;
case symconst_ofs_ent:
fprintf(F, "SymC %s offset", get_entity_name(get_SymConst_entity(n)));
break;
- case symconst_type_tag:
- ir_fprintf(F, "SymC %+F tag", get_SymConst_type(n));
- break;
case symconst_type_size:
ir_fprintf(F, "SymC %+F size", get_SymConst_type(n));
break;
fprintf(F, " entity: ");
dump_entity_to_file(F, get_SymConst_entity(n));
break;
- case symconst_type_tag:
- fprintf(F, " kind: type_tag\n");
- fprintf(F, " type: ");
- dump_type_to_file(F, get_SymConst_type(n));
- break;
case symconst_type_size:
fprintf(F, " kind: size\n");
fprintf(F, " type: ");
ir_graph *irg;
switch (get_SymConst_kind(symc)) {
- case symconst_type_tag:
- assert(!"SymConst kind symconst_type_tag not implemented");
- break;
case symconst_type_size:
/* rewrite the SymConst node by a Const node */
irg = get_irn_irg(symc);
class SymConst(Op):
"""A symbolic constant.
- - *symconst_type_tag* The symbolic constant represents a type tag. The
- type the tag stands for is given explicitly.
- *symconst_type_size* The symbolic constant represents the size of a type.
The type of which the constant represents the size
is given explicitly.
case iro_SymConst:
_tcsncat(pResult, "<", max);
switch (n.attr.symc.kind) {
- case symconst_type_tag:
- _tcsncat(pResult, "TAG:", max);
- if (format_type(pHelper, nBase, n.attr.symc.sym.type_p, name, sizeof(name), 0) != S_OK)
- return E_FAIL;
- _tcsncat(pResult, name, max);
- break;
case symconst_type_size:
_tcsncat(pResult, "SIZE:", max);
if (format_type(pHelper, nBase, n.attr.symc.sym.type_p, name, sizeof(name), 0) != S_OK)