IRTermSubKind type classifies the data type of an IRTerm that has kind TYPE. When you access the sub_kind field on a type term, it returns one of these constants indicating whether the type is an integer, pointer, struct, and so on.
Fields
| Field | Description | Type |
|---|---|---|
VOID | Void type | IRTermSubKind |
BOOL | Boolean type | IRTermSubKind |
CHAR | Character type | IRTermSubKind |
UNSIGNED_CHAR | Unsigned character type | IRTermSubKind |
CHAR16 | 16-bit character type | IRTermSubKind |
CHAR32 | 32-bit character type | IRTermSubKind |
WCHAR | Wide character type | IRTermSubKind |
UNSIGNED_WCHAR | Unsigned wide character type | IRTermSubKind |
INT | Integer type | IRTermSubKind |
UNSIGNED_INT | Unsigned integer type | IRTermSubKind |
FLOAT | Floating point type | IRTermSubKind |
POINTER | Pointer type | IRTermSubKind |
SHIFTED_POINTER | Shifted pointer type | IRTermSubKind |
STRUCT | Structure type | IRTermSubKind |
FUNC | Function type | IRTermSubKind |
ENUM | Enumeration type | IRTermSubKind |
UNION | Union type | IRTermSubKind |
ARRAY | Array type | IRTermSubKind |
INCOMPLETE_ARRAY | Incomplete array type | IRTermSubKind |
TYPEDEF | Typedef type | IRTermSubKind |
Reference
Primitive types
VOID: the void type, representing the absence of a value.BOOL: a boolean type.INT: a signed integer type. The bit width is given by the term’snum_bitsfield.UNSIGNED_INT: an unsigned integer type.FLOAT: a floating-point type.
Character types
CHAR: a signed character type (typically 8-bit).UNSIGNED_CHAR: an unsigned character type.CHAR16: a 16-bit character type (e.g.,char16_t).CHAR32: a 32-bit character type (e.g.,char32_t).WCHAR: a wide character type (wchar_t).UNSIGNED_WCHAR: an unsigned wide character type.
Pointer types
POINTER: a standard pointer type.SHIFTED_POINTER: a pointer with an applied offset, commonly seen in structure member access patterns.
Composite types
STRUCT: a structure type. Access its fields via the parent term’sstruct_fields.UNION: a union type. Access its variants viaunion_variants.ENUM: an enumeration type. Access its variants viaenum_variants.
Function and array types
FUNC: a function type. Access its arguments viafunction_argumentsand return type viafunction_return_type.ARRAY: a fixed-size array type.INCOMPLETE_ARRAY: an array type without a known size (e.g., a flexible array member).
Other
TYPEDEF: a typedef alias. The aliased type name is available via the term’snamefield.