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(), diagnostic_context::clone_printer(), end, error_mark_node, get_identifier(), global_dc, HOST_WIDE_INT_M1U, integer_one_node, minsize, NULL_TREE, pp_formatted_text(), pp_printf(), size, size_int, static_p, str, TREE_TYPE, TREE_VALUE, and TYPE_QUALS.
|
static |
Reset front end-specific attribute access data from ATTRS. Called from the free_lang_data pass.
static
References DECL_P, 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.
Referenced by init_attr_rdwr_indices().
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, 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.
unsigned attr_access::vla_bounds | ( | unsigned * | nunspec | ) | const |
Return the number of specified VLA bounds and set *nunspec to the number of unspecified ones (those designated by [*]).
References str.
const char * attr_access::end |
Referenced by array_as_string(), init_attr_rdwr_indices(), and to_internal_string().
bool attr_access::internal_p |
Referenced by init_attr_rdwr_indices().
unsigned HOST_WIDE_INT attr_access::minsize |
Referenced by array_as_string(), and init_attr_rdwr_indices().
access_mode attr_access::mode |
Referenced by init_attr_rdwr_indices(), and to_external_string().
|
staticconstexpr |
Defined in attr_access.
Referenced by from_mode_char().
|
staticconstexpr |
Referenced by to_external_string().
tree attr_access::ptr |
unsigned attr_access::ptrarg |
Referenced by init_attr_rdwr_indices(), and to_external_string().
unsigned attr_access::sizarg |
Referenced by init_attr_rdwr_indices(), and to_external_string().
tree attr_access::size |
Referenced by array_as_string(), and init_attr_rdwr_indices().
bool attr_access::static_p |
Referenced by array_as_string(), and init_attr_rdwr_indices().
const char* attr_access::str |
Referenced by array_as_string(), init_attr_rdwr_indices(), to_internal_string(), and vla_bounds().