libFirm
Cast node

perform a high-level type cast More...

Enumerations

enum  n_Cast { n_Cast_op, n_Cast_max = n_Cast_op }
 Input numbers for Cast node. More...

Functions

int is_Cast_upcast (ir_node *node)
 Checks for upcast.
int is_Cast_downcast (ir_node *node)
 Checks for downcast.
ir_nodenew_rd_Cast (dbg_info *dbgi, ir_node *block, ir_node *irn_op, ir_type *type)
 Construct a Cast node.
ir_nodenew_r_Cast (ir_node *block, ir_node *irn_op, ir_type *type)
 Construct a Cast node.
ir_nodenew_d_Cast (dbg_info *dbgi, ir_node *irn_op, ir_type *type)
 Construct a Cast node.
ir_nodenew_Cast (ir_node *irn_op, ir_type *type)
 Construct a Cast node.
int is_Cast (const ir_node *node)
 Test if node is a Cast.
ir_nodeget_Cast_op (const ir_node *node)
 Returns op input of a Cast node.
void set_Cast_op (ir_node *node, ir_node *op)
 Sets op input of a Cast node.
ir_typeget_Cast_type (const ir_node *node)
 Returns type attribute of a Cast node.
void set_Cast_type (ir_node *node, ir_type *type)
 Sets type attribute of a Cast node.
ir_opget_op_Cast (void)
 Returns opcode for Cast nodes.

Variables

ir_opop_Cast
 Cast opcode.

Detailed Description

perform a high-level type cast

Enumeration Type Documentation

enum n_Cast

Input numbers for Cast node.

Definition at line 906 of file nodeops.h.

Function Documentation

ir_node* get_Cast_op ( const ir_node node)

Returns op input of a Cast node.

ir_type* get_Cast_type ( const ir_node node)

Returns type attribute of a Cast node.

ir_op* get_op_Cast ( void  )

Returns opcode for Cast nodes.

int is_Cast ( const ir_node node)

Test if node is a Cast.

Returns
1 if the node is a Cast node, 0 otherwise
int is_Cast_downcast ( ir_node node)

Checks for downcast.

Returns true if the Cast node casts a class type to a sub type. Works also for pointers to classes (recursively).

Needs typeinfo calculated.

int is_Cast_upcast ( ir_node node)

Checks for upcast.

Returns true if the Cast node casts a class type to a super type. Works also for pointers to classes (recursively).

Needs typeinfo calculated.

ir_node* new_Cast ( ir_node irn_op,
ir_type type 
)

Construct a Cast node.

Parameters
irn_opoperand
typetarget type of the case
ir_node* new_d_Cast ( dbg_info dbgi,
ir_node irn_op,
ir_type type 
)

Construct a Cast node.

Parameters
dbgiA pointer to debug information.
irn_opoperand
typetarget type of the case
ir_node* new_r_Cast ( ir_node block,
ir_node irn_op,
ir_type type 
)

Construct a Cast node.

Parameters
blockThe IR block the node belongs to.
irn_opoperand
typetarget type of the case
ir_node* new_rd_Cast ( dbg_info dbgi,
ir_node block,
ir_node irn_op,
ir_type type 
)

Construct a Cast node.

Parameters
dbgiA pointer to debug information.
blockThe IR block the node belongs to.
irn_opoperand
typetarget type of the case
void set_Cast_op ( ir_node node,
ir_node op 
)

Sets op input of a Cast node.

void set_Cast_type ( ir_node node,
ir_type type 
)

Sets type attribute of a Cast node.

Variable Documentation

ir_op* op_Cast

Cast opcode.

Definition at line 153 of file opcodes.h.