summaryrefslogtreecommitdiff
path: root/0120-Backport-SME-aarch64-Avoid-std-string-in-static-data.patch
blob: 619342b8e2ce45ce62437f018c9715836ffe1dd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 7096be1673a10da5218a8620fb40b4b26e61c1d4 Mon Sep 17 00:00:00 2001
From: Richard Sandiford <richard.sandiford@arm.com>
Date: Thu, 29 Sep 2022 11:32:55 +0100
Subject: [PATCH 021/157] [Backport][SME] aarch64: Avoid std::string in static
 data

Reference: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=13af9e9fda391f4f0566ad8f0b4d0448a7e984d0

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 --git a/gcc/common/config/aarch64/aarch64-common.cc b/gcc/common/config/aarch64/aarch64-common.cc
index 057dc094d..2bdf51b8b 100644
--- a/gcc/common/config/aarch64/aarch64-common.cc
+++ b/gcc/common/config/aarch64/aarch64-common.cc
@@ -223,7 +223,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;
 };
@@ -231,7 +231,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;
 };
 
-- 
2.33.0