libFirm
Union

The union type represents union types. More...

Functions

ir_typenew_type_union (ident *name)
 Creates a new type union.
ir_typenew_d_type_union (ident *name, type_dbg_info *db)
 Creates a new type union with debug information.
identget_union_ident (const ir_type *uni)
 Returns union identifier.
const char * get_union_name (const ir_type *uni)
 Returns union identifier as c-string.
size_t get_union_n_members (const ir_type *uni)
 Returns the number of unioned types of this union.
ir_entityget_union_member (const ir_type *uni, size_t pos)
 Returns the entity at position pos of a union.
size_t get_union_member_index (const ir_type *uni, ir_entity *member)
 Returns index of member in uni, -1 if not contained.
int is_Union_type (const ir_type *uni)
 Returns true if a type is a union type.
const tp_opget_tpop_union (void)
 Returns type opcode for union type.

Variables

const tp_optype_union
 This type opcode marks that the corresponding type is a union type.

Detailed Description

The union type represents union types.

Note that this representation resembles the C union type. For tagged variant types like in Pascal or Modula a combination of a struct and a union type must be used.

Function Documentation

const tp_op* get_tpop_union ( void  )

Returns type opcode for union type.

See Also
type_union
ident* get_union_ident ( const ir_type uni)

Returns union identifier.

ir_entity* get_union_member ( const ir_type uni,
size_t  pos 
)

Returns the entity at position pos of a union.

size_t get_union_member_index ( const ir_type uni,
ir_entity member 
)

Returns index of member in uni, -1 if not contained.

size_t get_union_n_members ( const ir_type uni)

Returns the number of unioned types of this union.

const char* get_union_name ( const ir_type uni)

Returns union identifier as c-string.

int is_Union_type ( const ir_type uni)

Returns true if a type is a union type.

ir_type* new_d_type_union ( ident name,
type_dbg_info db 
)

Creates a new type union with debug information.

ir_type* new_type_union ( ident name)

Creates a new type union.

Variable Documentation

const tp_op* type_union

This type opcode marks that the corresponding type is a union type.

Consequently it refers to a list of unioned types. This struct is dynamically allocated but constant for the lifetime of the library.

Definition at line 1572 of file typerep.h.