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"
bool attribute_ignored_p(tree attr)
Definition attribs.cc:562
int attribute_list_contained(const_tree l1, const_tree l2)
Definition attribs.cc:2106
tree make_attribute(string_slice name, string_slice arg_name, tree chain)
Definition attribs.cc:1078
scoped_attributes * register_scoped_attributes(const scoped_attribute_specs &specs, bool ignored_p)
Definition attribs.cc:128
tree remove_attribute(const char *attr_name, tree list)
Definition attribs.cc:1684
void copy_attributes_to_builtin(tree decl)
Definition attribs.cc:1854
void init_attributes(void)
Definition attribs.cc:320
bool is_function_default_version(const tree decl)
Definition attribs.cc:1264
attr_access * get_parm_access(rdwr_map &rdwr_idx, tree parm, tree fndecl)
Definition attribs.cc:2557
tree make_dispatcher_decl(const tree decl)
Definition attribs.cc:1203
void duplicate_one_attribute(tree *attrs, tree attr, const char *name)
Definition attribs.cc:1828
tree private_lookup_attribute(const char *attr_name, size_t attr_len, tree list)
Definition attribs.cc:2153
bool cxx11_attribute_p(const_tree attr)
Definition attribs.cc:1042
char * sorted_attr_string(tree arglist)
Definition attribs.cc:1127
tree build_decl_attribute_variant(tree ddecl, tree attribute)
Definition attribs.cc:1298
void maybe_diag_alias_attributes(tree alias, tree target)
Definition attribs.cc:2344
void handle_ignored_attributes_option(vec< char * > *v)
Definition attribs.cc:233
bool functions_b_resolvable_from_a(tree decl_a, tree decl_b, tree base)
Definition attribs.cc:1092
tree get_attribute_namespace(const_tree attr)
Definition attribs.cc:426
tree affects_type_identity_attributes(tree attrs, bool value)
Definition attribs.cc:1605
void init_attr_rdwr_indices(rdwr_map *rwm, tree attrs)
Definition attribs.cc:2408
tree build_type_attribute_variant(tree ttype, tree attribute)
Definition attribs.cc:1643
tree restrict_type_identity_attributes_to(tree attrs, tree ok_attrs)
Definition attribs.cc:1618
unsigned decls_mismatched_attributes(tree tmpl, tree decl, tree attrlist, const char *const blacklist[], auto_vec< const char * > &outattrs)
Definition attribs.cc:2251
tree decl_attributes(tree *node, tree attributes, int flags, tree last_decl)
Definition attribs.cc:625
const struct attribute_spec * lookup_attribute_spec(const_tree name)
Definition attribs.cc:404
tree get_attribute_name(const_tree attr)
Definition attribs.cc:1058
bool attribute_value_equal(const_tree attr1, const_tree attr2)
Definition attribs.cc:1455
bool simple_cst_list_equal(const_tree l1, const_tree l2)
Definition attribs.cc:1394
tree merge_type_attributes(tree t1, tree t2)
Definition attribs.cc:1808
void apply_tm_attr(tree fndecl, tree attr)
Definition attribs.cc:1069
bool any_nonignored_attribute_p(tree attrs)
Definition attribs.cc:589
int attribute_list_equal(const_tree l1, const_tree l2)
Definition attribs.cc:2088
tree merge_attributes(tree a1, tree a2)
Definition attribs.cc:1733
void free_attr_data()
Definition attribs.cc:309
tree merge_decl_attributes(tree olddecl, tree newdecl)
Definition attribs.cc:1818
tree build_type_attribute_qual_variant(tree otype, tree attribute, int quals)
Definition attribs.cc:1310
int comp_type_attributes(const_tree type1, const_tree type2)
Definition attribs.cc:1499
hash_map< rdwr_access_hash, attr_access > rdwr_map
Definition attribs.h:402
tree lookup_attribute_by_prefix(const char *attr_name, tree list)
Definition attribs.h:280
bool is_attribute_namespace_p(const char *attr_ns, const_tree attr)
Definition attribs.h:204
tree merge_dllimport_decl_attributes(tree, tree)
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 *)
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
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:2625
access_mode mode
Definition attribs.h:344
tree to_internal_string() const
Definition attribs.cc:2579
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:2589
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:2669
unsigned vla_bounds(unsigned *) const
Definition attribs.cc:2605
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:58
#define gcc_unreachable()
Definition system.h:846
#define gcc_checking_assert(EXPR)
Definition system.h:826
tree current_function_decl
Definition toplev.cc:129
#define IDENTIFIER_LENGTH(NODE)
Definition tree.h:1236
#define TREE_CHAIN(NODE)
Definition tree.h:512
#define IDENTIFIER_POINTER(NODE)
Definition tree.h:1238
access_mode
Definition tree.h:6131
@ access_deferred
Definition tree.h:6136
@ access_none
Definition tree.h:6132
@ access_read_write
Definition tree.h:6135
@ access_write_only
Definition tree.h:6134
@ access_read_only
Definition tree.h:6133
#define NULL_TREE
Definition tree.h:318