public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Richard Sandiford <rsandifo@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-2945] aarch64: Avoid std::string in static data Date: Thu, 29 Sep 2022 10:34:48 +0000 (GMT) [thread overview] Message-ID: <20220929103448.BB40B3858425@sourceware.org> (raw) 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; };
reply other threads:[~2022-09-29 10:34 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220929103448.BB40B3858425@sourceware.org \ --to=rsandifo@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).