diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2024-09-04 09:06:53 -0700 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2024-09-06 05:48:46 -0700 |
commit | 1247fa6e95cdf4a6422ec802f733f1f7ecaa3557 (patch) | |
tree | f8cc71283acf76373e3f69da0d9a8c7a6c0ab651 | |
parent | db0fa0b35b922449d703c040383abf7acb349d9d (diff) | |
download | gcc-1247fa6e95cdf4a6422ec802f733f1f7ecaa3557.zip gcc-1247fa6e95cdf4a6422ec802f733f1f7ecaa3557.tar.gz gcc-1247fa6e95cdf4a6422ec802f733f1f7ecaa3557.tar.bz2 |
aarch64: Use is_attribute_namespace_p and get_attribute_name inside aarch64_lookup_shared_state_flags [PR116598]
The code in aarch64_lookup_shared_state_flags all C++11 attributes on the function type
had a namespace associated with them. But with the addition of reproducible/unsequenced,
this is not true.
This fixes the issue by using is_attribute_namespace_p instead of manually figuring out
the namespace is named "arm" and uses get_attribute_name instead of manually grabbing
the attribute name.
Built and tested for aarch64-linux-gnu.
gcc/ChangeLog:
PR target/116598
* config/aarch64/aarch64.cc (aarch64_lookup_shared_state_flags): Use
is_attribute_namespace_p and get_attribute_name instead of manually grabbing
the namespace and name of the attribute.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
-rw-r--r-- | gcc/config/aarch64/aarch64.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 27e24ba..6a3f1a2 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -594,14 +594,10 @@ aarch64_lookup_shared_state_flags (tree attrs, const char *state_name) { for (tree attr = attrs; attr; attr = TREE_CHAIN (attr)) { - if (!cxx11_attribute_p (attr)) + if (!is_attribute_namespace_p ("arm", attr)) continue; - auto ns = IDENTIFIER_POINTER (TREE_PURPOSE (TREE_PURPOSE (attr))); - if (strcmp (ns, "arm") != 0) - continue; - - auto attr_name = IDENTIFIER_POINTER (TREE_VALUE (TREE_PURPOSE (attr))); + auto attr_name = IDENTIFIER_POINTER (get_attribute_name (attr)); auto flags = aarch64_attribute_shared_state_flags (attr_name); if (!flags) continue; |