diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2022-09-29 11:32:55 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2022-09-29 11:32:55 +0100 |
commit | 60dee638c8a7ae59c033868de7e7638c88b38ed2 (patch) | |
tree | f28201e0da3ce9629fb953074d75fa19e8640c7a /gcc/cp/cp-objcp-common.cc | |
parent | 13af9e9fda391f4f0566ad8f0b4d0448a7e984d0 (diff) | |
download | gcc-60dee638c8a7ae59c033868de7e7638c88b38ed2.zip gcc-60dee638c8a7ae59c033868de7e7638c88b38ed2.tar.gz gcc-60dee638c8a7ae59c033868de7e7638c88b38ed2.tar.bz2 |
aarch64: Tweak constness of option-related data
Some of the option structures have all-const member variables.
That doesn't seem necessary: we can just use const on the objects
that are supposed to be read-only.
Also, with the new, more C++-heavy option handling, it seems
better to use constexpr for the static data, to make sure that
we're not adding unexpected overhead.
gcc/
* common/config/aarch64/aarch64-common.cc (aarch64_option_extension)
(processor_name_to_arch, arch_to_arch_name): Remove const from
member variables.
(all_extensions, all_cores, all_architectures): Make a constexpr.
* config/aarch64/aarch64.cc (processor): Remove const from
member variables.
(all_architectures): Make a constexpr.
* config/aarch64/driver-aarch64.cc (aarch64_core_data)
(aarch64_arch_driver_info): Remove const from member variables.
(aarch64_cpu_data, aarch64_arches): Make a constexpr.
(get_arch_from_id): Return a pointer to const.
(host_detect_local_cpu): Update accordingly.
Diffstat (limited to 'gcc/cp/cp-objcp-common.cc')
0 files changed, 0 insertions, 0 deletions