libFirm
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Identifiers

Typedefs

typedef const char ident
 Identifier. More...
 

Functions

identnew_id_from_str (const char *str)
 Store a string and create an ident. More...
 
identnew_id_from_chars (const char *str, size_t len)
 Store a string and create an ident. More...
 
identnew_id_fmt (char const *fmt,...)
 Create an ident from a format string. More...
 
const char * get_id_str (ident *id)
 Returns a string represented by an ident. More...
 
identid_unique (const char *tag)
 helper function for creating unique idents. More...
 

Detailed Description

Typedef Documentation

typedef const char ident

Identifier.

Note
This is currently defined as a normal C string, but you should not rely on that and always use get_id_str() before using it as a C string.

Definition at line 50 of file firm_types.h.

Function Documentation

const char* get_id_str ( ident id)

Returns a string represented by an ident.

Returns the string represented by id. This string is NULL terminated. The string may not be changed.

Parameters
idthe ident
Returns
cp a string
ident* id_unique ( const char *  tag)

helper function for creating unique idents.

It contains an internal counter and replaces a "%u" inside the tag with the counter.

ident* new_id_fmt ( char const *  fmt,
  ... 
)

Create an ident from a format string.

Returns
a handle for the generated ident
ident* new_id_from_chars ( const char *  str,
size_t  len 
)

Store a string and create an ident.

Stores a string in the ident module and returns a handle for the string. Copies the string. This version takes non-zero-terminated strings.

Parameters
strthe string (or whatever) which shall be stored
lenthe length of the data in bytes
Returns
id a handle for the generated ident
ident* new_id_from_str ( const char *  str)

Store a string and create an ident.

Stores a string in the ident module and returns a handle for the string.

Copies the string. str must be zero terminated

Parameters
strthe string which shall be stored
Returns
id a handle for the generated ident