On 08/27/2018 01:20 AM, Martin Liška wrote:
+/* For a FUNCTION_DECL NODE, nonzero means a built in function of a
+ standard library or more generally a built in function that is
+ recognized by optimizers and expanders.

I'm a little confused by this description: the last part makes
me wonder about what a true value implies about a function.  It
sounds like the function returns true for any built-in, library
or otherwise, correct (i.e., including a front-end built-in)?
If yes, then maybe drop the part about standard library functions?
Say:

  Return true if a FUNCTION_DECL NODE is a GCC built-in function.


+
+ Note that it is different from the DECL_IS_BUILTIN accessor. For
+ instance, user declared prototypes of C library functions are not
+ DECL_IS_BUILTIN but may be DECL_BUILT_IN.
+
+ When a NULL argument is pass or tree code of the NODE is not
FUNCTION_DECL
+ false is returned. */

"Passed" -- so perhaps "When NODE is null..."

Martin

+
+inline bool
+fndecl_built_in_p (const_tree node)
+{
+ return (node != NULL_TREE
+ && DECL_BUILT_IN_CLASS (node) != NOT_BUILT_IN);
+}

Reply via email to