libFirm
Loading...
Searching...
No Matches
Entity Initializers

Typedefs

typedef union ir_initializer_t ir_initializer_t
 Initializer (for entities)
 

Enumerations

enum  ir_initializer_kind_t { IR_INITIALIZER_CONST , IR_INITIALIZER_TARVAL , IR_INITIALIZER_NULL , IR_INITIALIZER_COMPOUND }
 the kind (type) of an initializer More...
 

Functions

ir_initializer_kind_t get_initializer_kind (const ir_initializer_t *initializer)
 Returns the kind of an initializer.
 
const char * get_initializer_kind_name (ir_initializer_kind_t ini)
 Returns the name of the initializer kind.
 
ir_initializer_tget_initializer_null (void)
 Returns the null initializer (there is only one instance of it in a program )
 
ir_initializer_tcreate_initializer_const (ir_node *value)
 Creates an initializer containing a reference to a node on the const-code irg.
 
ir_initializer_tcreate_initializer_tarval (ir_tarval *tv)
 Creates an initializer containing a single tarval value.
 
ir_nodeget_initializer_const_value (const ir_initializer_t *initializer)
 Returns the value contained in a const initializer.
 
ir_tarvalget_initializer_tarval_value (const ir_initializer_t *initialzier)
 Returns the value contained in a tarval initializer.
 
ir_initializer_tcreate_initializer_compound (size_t n_entries)
 Creates a compound initializer which holds n_entries entries.
 
size_t get_initializer_compound_n_entries (const ir_initializer_t *initializer)
 Returns the number of entries in a compound initializer.
 
void set_initializer_compound_value (ir_initializer_t *initializer, size_t index, ir_initializer_t *value)
 Sets entry with index index to the initializer value.
 
ir_initializer_tget_initializer_compound_value (const ir_initializer_t *initializer, size_t index)
 Returns the value with index index of a compound initializer.
 

Detailed Description

Typedef Documentation

◆ ir_initializer_t

Initializer (for entities)

Definition at line 89 of file firm_types.h.

Enumeration Type Documentation

◆ ir_initializer_kind_t

the kind (type) of an initializer

Enumerator
IR_INITIALIZER_CONST 

initializer containing an ir_node from the const-code irg

IR_INITIALIZER_TARVAL 

initializer containing a tarval

IR_INITIALIZER_NULL 

initializes type with default values (usually 0)

IR_INITIALIZER_COMPOUND 

list of initializers used to initialize a compound or array type

Definition at line 496 of file typerep.h.

Function Documentation

◆ create_initializer_compound()

ir_initializer_t * create_initializer_compound ( size_t n_entries)

Creates a compound initializer which holds n_entries entries.

◆ create_initializer_const()

ir_initializer_t * create_initializer_const ( ir_node * value)

Creates an initializer containing a reference to a node on the const-code irg.

◆ create_initializer_tarval()

ir_initializer_t * create_initializer_tarval ( ir_tarval * tv)

Creates an initializer containing a single tarval value.

◆ get_initializer_compound_n_entries()

size_t get_initializer_compound_n_entries ( const ir_initializer_t * initializer)

Returns the number of entries in a compound initializer.

◆ get_initializer_compound_value()

ir_initializer_t * get_initializer_compound_value ( const ir_initializer_t * initializer,
size_t index )

Returns the value with index index of a compound initializer.

◆ get_initializer_const_value()

ir_node * get_initializer_const_value ( const ir_initializer_t * initializer)

Returns the value contained in a const initializer.

◆ get_initializer_kind()

ir_initializer_kind_t get_initializer_kind ( const ir_initializer_t * initializer)

Returns the kind of an initializer.

◆ get_initializer_kind_name()

const char * get_initializer_kind_name ( ir_initializer_kind_t ini)

Returns the name of the initializer kind.

◆ get_initializer_null()

ir_initializer_t * get_initializer_null ( void )

Returns the null initializer (there is only one instance of it in a program )

◆ get_initializer_tarval_value()

ir_tarval * get_initializer_tarval_value ( const ir_initializer_t * initialzier)

Returns the value contained in a tarval initializer.

◆ set_initializer_compound_value()

void set_initializer_compound_value ( ir_initializer_t * initializer,
size_t index,
ir_initializer_t * value )

Sets entry with index index to the initializer value.