public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-2945] aarch64: Avoid std::string in static data
@ 2022-09-29 10:34 Richard Sandiford
  0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2022-09-29 10:34 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:13af9e9fda391f4f0566ad8f0b4d0448a7e984d0

commit r13-2945-g13af9e9fda391f4f0566ad8f0b4d0448a7e984d0
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Thu Sep 29 11:32:55 2022 +0100

    aarch64: Avoid std::string in static data
    
    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.

Diff:
---
 gcc/common/config/aarch64/aarch64-common.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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;
 };

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-29 10:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-29 10:34 [gcc r13-2945] aarch64: Avoid std::string in static data Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).