bool *));
static tree handle_noreturn_attribute PARAMS ((tree *, tree, tree, int,
bool *));
+static tree handle_noinline_attribute PARAMS ((tree *, tree, tree, int,
+ bool *));
+static tree handle_used_attribute PARAMS ((tree *, tree, tree, int,
+ bool *));
static tree handle_unused_attribute PARAMS ((tree *, tree, tree, int,
bool *));
static tree handle_const_attribute PARAMS ((tree *, tree, tree, int,
handle_noreturn_attribute },
{ "volatile", 0, 0, true, false, false,
handle_noreturn_attribute },
+ { "noinline", 0, 0, true, false, false,
+ handle_noinline_attribute },
+ { "used", 0, 0, true, false, false,
+ handle_used_attribute },
{ "unused", 0, 0, false, false, false,
handle_unused_attribute },
/* The same comments as for noreturn attributes apply to const ones. */
a decl attribute to the declaration rather than to its type). If
ATTR_FLAG_BUILT_IN is not set and *NODE is a DECL, then also consider
whether there might be some default attributes to apply to this DECL;
- if so, decl_attributes will be called recusrively with those attributes
+ if so, decl_attributes will be called recursively with those attributes
and ATTR_FLAG_BUILT_IN set. */
tree
return NULL_TREE;
}
+/* Handle a "noinline" attribute; arguments as in
+ struct attribute_spec.handler. */
+
+static tree
+handle_noinline_attribute (node, name, args, flags, no_add_attrs)
+ tree *node;
+ tree name;
+ tree args ATTRIBUTE_UNUSED;
+ int flags ATTRIBUTE_UNUSED;
+ bool *no_add_attrs;
+{
+ if (TREE_CODE (*node) == FUNCTION_DECL)
+ DECL_UNINLINABLE (*node) = 1;
+ else
+ {
+ warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+ *no_add_attrs = true;
+ }
+
+ return NULL_TREE;
+}
+
+/* Handle a "used" attribute; arguments as in
+ struct attribute_spec.handler. */
+
+static tree
+handle_used_attribute (node, name, args, flags, no_add_attrs)
+ tree *node;
+ tree name;
+ tree args ATTRIBUTE_UNUSED;
+ int flags ATTRIBUTE_UNUSED;
+ bool *no_add_attrs;
+{
+ if (TREE_CODE (*node) == FUNCTION_DECL)
+ TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (*node))
+ = TREE_USED (*node) = 1;
+ else
+ {
+ warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
+ *no_add_attrs = true;
+ }
+
+ return NULL_TREE;
+}
+
/* Handle a "unused" attribute; arguments as in
struct attribute_spec.handler. */