libFirm
|
Typedefs | |
typedef struct ir_platform_define_t | ir_platform_define_t |
Enumerations | |
enum | ir_platform_type_t { IR_TYPE_BOOL , IR_TYPE_CHAR , IR_TYPE_SHORT , IR_TYPE_INT , IR_TYPE_LONG , IR_TYPE_LONG_LONG , IR_TYPE_FLOAT , IR_TYPE_DOUBLE , IR_TYPE_LONG_DOUBLE } |
Object types from the C programming language. More... | |
Functions | |
unsigned | ir_platform_long_long_and_double_struct_align_override (void) |
May return an override to long long and double alignment in structs. | |
int | ir_platform_pic_is_default (void) |
Returns 1 if target should compile position independent code by default. | |
int | ir_platform_supports_thread_local_storage (void) |
Returns 1 if target and platform support thread local storage, 0 otherwise. | |
char const * | ir_platform_define_value (ir_platform_define_t const *define) |
Returns the value that the proprocessor define define should be defined to. | |
ir_platform_type_t | ir_platform_wchar_type (void) |
Returns the C type corresponding to wchar_t. | |
int | ir_platform_wchar_is_signed (void) |
Returns true if the wchar_t type is signed. | |
ir_platform_type_t | ir_platform_intptr_type (void) |
Returns C type used for pointer sized integer like intptr_t or size_t. | |
unsigned | ir_platform_type_size (ir_platform_type_t type) |
Returns the size of the C type type in bytes. | |
unsigned | ir_platform_type_align (ir_platform_type_t type) |
Returns the alignment of the C type type in bytes. | |
ir_mode * | ir_platform_type_mode (ir_platform_type_t type, int is_signed) |
Returns an ir_mode matching for the type type . | |
ir_type * | ir_platform_va_list_type (void) |
Returns type used for va_list values. | |
char | ir_platform_user_label_prefix (void) |
Returns the character "normal" linker identifiers are prefixed with. | |
char const * | ir_platform_default_exe_name (void) |
Returns the default executable name for the target (a.out or a.exe). | |
ident * | ir_platform_mangle_global (char const *name) |
Returns name mangled for platform. | |
ir_platform_define_t const * | ir_platform_define_first (void) |
Returns the first element in the list of target preprocessor defines. | |
ir_platform_define_t const * | ir_platform_define_next (ir_platform_define_t const *define) |
Returns the element following define in the list of target preprocessor defines or NULL if define is the last element. | |
char const * | ir_platform_define_name (ir_platform_define_t const *define) |
Returns the name of the preprocessor define define . | |
The functions in this API return information about the operating system or runtime system. This contains information about the platform ABI such as the size and alignment of C types, the name mangling of global symbols and a list of platform and target specific C preprocessor definitions.
typedef struct ir_platform_define_t ir_platform_define_t |
enum ir_platform_type_t |
char const * ir_platform_default_exe_name | ( | void | ) |
Returns the default executable name for the target (a.out or a.exe).
ir_platform_define_t const * ir_platform_define_first | ( | void | ) |
Returns the first element in the list of target preprocessor defines.
char const * ir_platform_define_name | ( | ir_platform_define_t const * | define | ) |
Returns the name of the preprocessor define define
.
ir_platform_define_t const * ir_platform_define_next | ( | ir_platform_define_t const * | define | ) |
Returns the element following define
in the list of target preprocessor defines or NULL if define
is the last element.
char const * ir_platform_define_value | ( | ir_platform_define_t const * | define | ) |
Returns the value that the proprocessor define define
should be defined to.
ir_platform_type_t ir_platform_intptr_type | ( | void | ) |
Returns C type used for pointer sized integer like intptr_t or size_t.
unsigned ir_platform_long_long_and_double_struct_align_override | ( | void | ) |
May return an override to long long and double alignment in structs.
This is a special case: Old C compilers had a bug where long long and double where aligned differently inside structs. Some ABIs explicitely stay compatible to this.
ident * ir_platform_mangle_global | ( | char const * | name | ) |
Returns name mangled for platform.
This usually adds the user_label_prefix ('_' on win32, macOS, "" on ELF based systems) in front of the identifier.
int ir_platform_pic_is_default | ( | void | ) |
Returns 1 if target should compile position independent code by default.
int ir_platform_supports_thread_local_storage | ( | void | ) |
Returns 1 if target and platform support thread local storage, 0 otherwise.
unsigned ir_platform_type_align | ( | ir_platform_type_t | type | ) |
Returns the alignment of the C type type
in bytes.
ir_mode * ir_platform_type_mode | ( | ir_platform_type_t | type, |
int | is_signed ) |
Returns an ir_mode matching for the type type
.
unsigned ir_platform_type_size | ( | ir_platform_type_t | type | ) |
Returns the size of the C type type
in bytes.
char ir_platform_user_label_prefix | ( | void | ) |
Returns the character "normal" linker identifiers are prefixed with.
ir_type * ir_platform_va_list_type | ( | void | ) |
Returns type used for va_list values.
May be a pointer type, a struct type or NULL if the backend does not support variadic functions.
int ir_platform_wchar_is_signed | ( | void | ) |
Returns true if the wchar_t type is signed.
ir_platform_type_t ir_platform_wchar_type | ( | void | ) |
Returns the C type corresponding to wchar_t.
Note that technically in C++ wchar_t is an own type; this function will return a type with the same characteristics anyway.