aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2023-12-02 13:49:54 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2023-12-02 13:49:54 +0000
commit3956f5146dc13aa72977c222cfe472ba1e92834c (patch)
treede25f56cf6e949b8344be2a47469d8059c85d077 /gcc/function.h
parent301dec8533460152c4dd61f46c8e9276e169c49a (diff)
downloadgcc-3956f5146dc13aa72977c222cfe472ba1e92834c.zip
gcc-3956f5146dc13aa72977c222cfe472ba1e92834c.tar.gz
gcc-3956f5146dc13aa72977c222cfe472ba1e92834c.tar.bz2
attribs: Cache the gnu namespace
Later patches add more calls to get_attribute_namespace. For scoped attributes, this is a simple operation on tree pointers. But for normal GNU attributes (the vast majority), it involves a call to get_identifier ("gnu"). This patch caches the identifier for speed. gcc/ * Makefile.in (GTFILES): Add attribs.cc. * attribs.cc (gnu_namespace_cache): New variable. (get_gnu_namespace): New function. (lookup_attribute_spec): Use it instead of get_identifier ("gnu"). (get_attribute_namespace, attribs_cc_tests): Likewise.
Diffstat (limited to 'gcc/function.h')
0 files changed, 0 insertions, 0 deletions