libFirm
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Entity Initializers

Typedefs

typedef union ir_initializer_t ir_initializer_t
 Initializer (for entities) More...
 

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

Detailed Description

Typedef Documentation

Initializer (for entities)

Definition at line 89 of file firm_types.h.

Enumeration Type Documentation

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 initializer a compound or array type

Definition at line 509 of file typerep.h.

Function Documentation

ir_initializer_t* create_initializer_compound ( size_t  n_entries)

Creates a compound initializer which holds n_entries entries.

ir_initializer_t* create_initializer_const ( ir_node value)

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

ir_initializer_t* create_initializer_tarval ( ir_tarval tv)

Creates an initializer containing a single tarval value.

size_t get_initializer_compound_n_entries ( const ir_initializer_t initializer)

Returns the number of entries in a compound initializer.

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.

ir_node* get_initializer_const_value ( const ir_initializer_t initializer)

Returns value contained in a const initializer.

ir_initializer_kind_t get_initializer_kind ( const ir_initializer_t initializer)

Returns kind of an initializer.

const char* get_initializer_kind_name ( ir_initializer_kind_t  ini)

Returns the name of the initializer kind.

ir_initializer_t* get_initializer_null ( void  )

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

ir_tarval* get_initializer_tarval_value ( const ir_initializer_t initialzier)

Returns value contained in a tarval 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.