128 const char *attr_name,
129 size_t attr_ns_len,
size_t attr_len,
146 if (l > 4 && s[0] ==
'_' && s[1] ==
'_' && s[l - 1] ==
'_' && s[l - 2] ==
'_')
175 const char *attr2,
size_t attr2_len)
177 return attr1_len == attr2_len && strncmp (attr1, attr2, attr1_len) == 0;
185 return cmp_attribs (attr1, strlen (attr1), attr2, strlen (attr2));
225 if (CHECKING_P && attr_name[0] !=
'_')
227 size_t attr_len = strlen (attr_name);
235 size_t attr_len = strlen (attr_name);
249 if (CHECKING_P && attr_name[0] !=
'_')
251 size_t attr_len = strlen (attr_name);
254 if (CHECKING_P && attr_ns && attr_ns[0] !=
'_')
256 size_t attr_ns_len = strlen (attr_ns);
264 size_t attr_ns_len = attr_ns ? strlen (attr_ns) : 0;
265 size_t attr_len = strlen (attr_name);
270 attr_ns_len, attr_len, list);
288 size_t attr_len = strlen (attr_name);
294 if (attr_len > ident_len)
302 || (ident_len > 1 && p[1] !=
'_'));
303 if (strncmp (attr_name, p, attr_len) == 0)
373 static constexpr char mode_chars[5] = {
'-',
'r',
'w',
'x',
'^' };
378 "none",
"read_only",
"write_only",
"read_write"
void maybe_diag_alias_attributes(tree, tree)
Definition attribs.cc:2304
bool is_function_default_version(const tree)
Definition attribs.cc:1287
bool simple_cst_list_equal(const_tree, const_tree)
Definition attribs.cc:1399
int attribute_list_contained(const_tree, const_tree)
Definition attribs.cc:2066
tree build_type_attribute_variant(tree, tree)
Definition attribs.cc:1644
hash_map< rdwr_access_hash, attr_access > rdwr_map
Definition attribs.h:402
int comp_type_attributes(const_tree, const_tree)
Definition attribs.cc:1500
void init_attributes(void)
Definition attribs.cc:319
tree lookup_attribute_by_prefix(const char *attr_name, tree list)
Definition attribs.h:280
char * sorted_attr_string(tree)
Definition attribs.cc:1114
bool attribute_value_equal(const_tree, const_tree)
Definition attribs.cc:1460
tree make_dispatcher_decl(const tree)
Definition attribs.cc:1255
bool is_attribute_namespace_p(const char *attr_ns, const_tree attr)
Definition attribs.h:204
tree private_lookup_attribute(const char *attr_name, size_t attr_len, tree list)
Definition attribs.cc:2113
tree merge_dllimport_decl_attributes(tree, tree)
tree decl_attributes(tree *, tree, int, tree=NULL_TREE)
Definition attribs.cc:624
tree build_type_attribute_qual_variant(tree, tree, int)
Definition attribs.cc:1315
struct scoped_attributes * register_scoped_attributes(const scoped_attribute_specs &, bool=false)
Definition attribs.cc:127
void duplicate_one_attribute(tree *, tree, const char *)
Definition attribs.cc:1801
bool cxx11_attribute_p(const_tree)
Definition attribs.cc:1043
const struct attribute_spec * lookup_attribute_spec(const_tree)
Definition attribs.cc:403
bool any_nonignored_attribute_p(tree)
Definition attribs.cc:588
unsigned decls_mismatched_attributes(tree, tree, tree, const char *const[], auto_vec< const char * > &)
Definition attribs.cc:2211
tree get_attribute_name(const_tree)
Definition attribs.cc:1059
tree merge_attributes(tree, tree)
Definition attribs.cc:1734
bool attribute_ignored_p(tree)
Definition attribs.cc:561
void apply_tm_attr(tree, tree)
Definition attribs.cc:1070
void copy_attributes_to_builtin(tree)
Definition attribs.cc:1827
int attribute_list_equal(const_tree, const_tree)
Definition attribs.cc:2048
attr_access * get_parm_access(rdwr_map &, tree, tree=current_function_decl)
Definition attribs.cc:2517
tree affects_type_identity_attributes(tree, bool=true)
Definition attribs.cc:1606
bool common_function_versions(tree, tree)
Definition attribs.cc:1191
tree make_attribute(const char *, const char *, tree)
Definition attribs.cc:1079
tree merge_type_attributes(tree, tree)
Definition attribs.cc:1781
tree remove_attribute(const char *, tree)
Definition attribs.cc:1685
tree build_decl_attribute_variant(tree, tree)
Definition attribs.cc:1303
bool cmp_attribs(const char *attr1, size_t attr1_len, const char *attr2, size_t attr2_len)
Definition attribs.h:174
bool canonicalize_attr_name(const char *&s, T &l)
Definition attribs.h:144
tree handle_dll_attribute(tree *, tree, tree, int, bool *)
tree restrict_type_identity_attributes_to(tree, tree)
Definition attribs.cc:1619
tree get_attribute_namespace(const_tree)
Definition attribs.cc:425
bool is_attribute_p(const char *attr_name, const_tree ident)
Definition attribs.h:192
tree lookup_attribute(const char *attr_name, tree list)
Definition attribs.h:223
void init_attr_rdwr_indices(rdwr_map *, tree)
Definition attribs.cc:2368
tree merge_decl_attributes(tree, tree)
Definition attribs.cc:1791
void free_attr_data()
Definition attribs.cc:308
void handle_ignored_attributes_option(vec< char * > *)
Definition attribs.cc:232
const union tree_node * const_tree
Definition coretypes.h:98
union tree_node * tree
Definition coretypes.h:97
tree get_identifier_with_length(const char *text, size_t length)
Definition stringpool.cc:119
static void free_lang_data(tree)
Definition attribs.cc:2585
access_mode mode
Definition attribs.h:344
tree to_internal_string() const
Definition attribs.cc:2539
static constexpr char mode_names[4][11]
Definition attribs.h:376
const char * str
Definition attribs.h:320
tree ptr
Definition attribs.h:322
static constexpr char mode_chars[5]
Definition attribs.h:373
unsigned ptrarg
Definition attribs.h:335
bool static_p
Definition attribs.h:351
const char * end
Definition attribs.h:320
bool internal_p
Definition attribs.h:348
tree to_external_string() const
Definition attribs.cc:2549
static access_mode from_mode_char(char)
Definition attribs.h:383
unsigned sizarg
Definition attribs.h:336
tree size
Definition attribs.h:328
unsigned HOST_WIDE_INT minsize
Definition attribs.h:341
std::string array_as_string(tree) const
Definition attribs.cc:2629
unsigned vla_bounds(unsigned *) const
Definition attribs.cc:2565
Definition hash-traits.h:122
const char * ns
Definition attribs.h:26
array_slice< const attribute_spec > attributes
Definition attribs.h:27
#define NULL
Definition system.h:50
#define gcc_unreachable()
Definition system.h:841
#define gcc_checking_assert(EXPR)
Definition system.h:821
tree current_function_decl
Definition toplev.cc:127
#define IDENTIFIER_LENGTH(NODE)
Definition tree.h:1206
#define TREE_CHAIN(NODE)
Definition tree.h:511
#define IDENTIFIER_POINTER(NODE)
Definition tree.h:1208
access_mode
Definition tree.h:5897
@ access_deferred
Definition tree.h:5902
@ access_none
Definition tree.h:5898
@ access_read_write
Definition tree.h:5901
@ access_write_only
Definition tree.h:5900
@ access_read_only
Definition tree.h:5899
#define NULL_TREE
Definition tree.h:317