libFirm
Struct

A struct type represents aggregate types that consist of a list of fields. More...

Functions

ir_typenew_type_struct (ident *name)
 Creates a new type struct.
ir_typenew_d_type_struct (ident *name, type_dbg_info *db)
 Creates a new type struct with debug information.
identget_struct_ident (const ir_type *strct)
 Returns struct identifier.
const char * get_struct_name (const ir_type *strct)
 Returns struct identifier as c-string.
size_t get_struct_n_members (const ir_type *strct)
 Returns the number of members of this struct.
ir_entityget_struct_member (const ir_type *strct, size_t pos)
 Returns the member at position pos, pos < n_member.
size_t get_struct_member_index (const ir_type *strct, ir_entity *member)
 Returns index of member in strct, -1 if not contained.
int is_Struct_type (const ir_type *strct)
 Returns true if a type is a struct type.
const tp_opget_tpop_struct (void)
 Returns type opcode for struct type.

Variables

const tp_optype_struct
 This type opcode marks that the corresponding type is a compound type as a struct in C.

Detailed Description

A struct type represents aggregate types that consist of a list of fields.

The following attributes are private to this type kind:

Function Documentation

ident* get_struct_ident ( const ir_type strct)

Returns struct identifier.

ir_entity* get_struct_member ( const ir_type strct,
size_t  pos 
)

Returns the member at position pos, pos < n_member.

size_t get_struct_member_index ( const ir_type strct,
ir_entity member 
)

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

size_t get_struct_n_members ( const ir_type strct)

Returns the number of members of this struct.

const char* get_struct_name ( const ir_type strct)

Returns struct identifier as c-string.

const tp_op* get_tpop_struct ( void  )

Returns type opcode for struct type.

See Also
type_struct
int is_Struct_type ( const ir_type strct)

Returns true if a type is a struct type.

ir_type* new_d_type_struct ( ident name,
type_dbg_info db 
)

Creates a new type struct with debug information.

ir_type* new_type_struct ( ident name)

Creates a new type struct.

Variable Documentation

const tp_op* type_struct

This type opcode marks that the corresponding type is a compound type as a struct in C.

Consequently the type refers to a list of entities which may not be methods (but pointers to methods). This struct is dynamically allocated but constant for the lifetime of the library.

Definition at line 1520 of file typerep.h.