GCC Middle and Back End API Reference
|
#include <attribs.h>
Public Member Functions | |
unsigned | vla_bounds (unsigned *) const |
tree | to_internal_string () const |
tree | to_external_string () const |
std::string | array_as_string (tree) const |
Static Public Member Functions | |
static access_mode | from_mode_char (char) |
static void | free_lang_data (tree) |
Data Fields | |
const char * | str |
const char * | end |
tree | ptr |
tree | size |
unsigned | ptrarg |
unsigned | sizarg |
unsigned HOST_WIDE_INT | minsize |
access_mode | mode |
bool | internal_p |
bool | static_p |
Static Public Attributes | |
static constexpr char | mode_chars [5] = { '-', 'r', 'w', 'x', '^' } |
static constexpr char | mode_names [4][11] |
Description of a function argument declared with attribute access. Used as an "iterator" over all such arguments in a function declaration or call.
std::string attr_access::array_as_string | ( | tree | type | ) | const |
Format an array, including a VLA, pointed to by TYPE and used as a function parameter as a human-readable string. ACC describes an access to the parameter and is used to determine the outermost form of the array including its bound which is otherwise obviated by its decay to pointer. Return the formatted string.
References build_array_type(), build_index_type(), build_tree_list(), build_type_attribute_qual_variant(), pretty_printer::clone(), end, error_mark_node, get_identifier(), ggc_alloc(), global_dc, HOST_WIDE_INT_M1U, integer_one_node, minsize, NULL_TREE, pp_formatted_text(), pp_printf(), diagnostic_context::printer, size, size_int, static_p, str, TREE_TYPE, TREE_VALUE, and TYPE_QUALS.
Reset front end-specific attribute access data from ATTRS. Called from the free_lang_data pass.
static
References DECL_P, ggc_alloc(), lookup_attribute(), NULL_TREE, TREE_CHAIN, and TREE_VALUE.
|
inlinestatic |
References access_deferred, access_none, access_read_only, access_read_write, access_write_only, gcc_unreachable, and mode_chars.
tree attr_access::to_external_string | ( | ) | const |
Return the human-readable representation of the external attribute specification (as it might appear in the source code) as STRING_CST. External positional arguments are one-based.
References access_deferred, build_string(), gcc_assert, ggc_alloc(), mode, mode_names, ptrarg, sizarg, and UINT_MAX.
tree attr_access::to_internal_string | ( | ) | const |
Return the internal representation as STRING_CST. Internal positional arguments are zero-based.
References build_string(), end, and str.
Return the number of specified VLA bounds and set *nunspec to the number of unspecified ones (those designated by [*]).
References ggc_alloc(), and str.
Referenced by array_as_string(), and to_internal_string().
bool attr_access::internal_p |
unsigned HOST_WIDE_INT attr_access::minsize |
Referenced by array_as_string().
access_mode attr_access::mode |
Referenced by to_external_string().
Defined in attr_access.
Referenced by from_mode_char().
Referenced by to_external_string().
tree attr_access::ptr |
unsigned attr_access::ptrarg |
Referenced by to_external_string().
unsigned attr_access::sizarg |
Referenced by to_external_string().
tree attr_access::size |
Referenced by array_as_string().
bool attr_access::static_p |
Referenced by array_as_string().
Referenced by array_as_string(), to_internal_string(), and vla_bounds().