diff mbox series

[12/17] aarch64: Avoid std::string in static data

Message ID mpta66isbre.fsf@arm.com
State New
Headers show
Series Rework aarch64 feature macro definitions | expand

Commit Message

Richard Sandiford Sept. 29, 2022, 10:41 a.m. UTC
Just a minor patch to avoid having to construct std::strings
in static data.

gcc/
	* common/config/aarch64/aarch64-common.cc (processor_name_to_arch)
	(arch_to_arch_name): Use const char * instead of std::string.
---
 gcc/common/config/aarch64/aarch64-common.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/gcc/common/config/aarch64/aarch64-common.cc b/gcc/common/config/aarch64/aarch64-common.cc
index 85fb5f26d99..8760e092064 100644
--- a/gcc/common/config/aarch64/aarch64-common.cc
+++ b/gcc/common/config/aarch64/aarch64-common.cc
@@ -147,7 +147,7 @@  static const struct aarch64_option_extension all_extensions[] =
 
 struct processor_name_to_arch
 {
-  const std::string processor_name;
+  const char *const processor_name;
   const enum aarch64_arch arch;
   const uint64_t flags;
 };
@@ -155,7 +155,7 @@  struct processor_name_to_arch
 struct arch_to_arch_name
 {
   const enum aarch64_arch arch;
-  const std::string arch_name;
+  const char *const arch_name;
   const uint64_t flags;
 };