@@ -77,15 +77,15 @@ struct ExtName {
7777 StringRef NegFeature;
7878};
7979
80- const ExtName ARCHExtNames[] = {
80+ constexpr ExtName ARCHExtNames[] = {
8181#define ARM_ARCH_EXT_NAME (NAME, ID, FEATURE, NEGFEATURE ) \
8282 {NAME, ID, FEATURE, NEGFEATURE},
8383#include " ARMTargetParser.def"
8484};
8585
8686// List of HWDiv names (use getHWDivSynonym) and which architectural
8787// features they correspond to (use getHWDivFeatures).
88- const struct {
88+ constexpr struct {
8989 StringRef Name;
9090 uint64_t ID;
9191} HWDivNames[] = {
@@ -112,7 +112,7 @@ struct CpuNames {
112112 uint64_t DefaultExtensions;
113113};
114114
115- const CpuNames CPUNames[] = {
115+ constexpr CpuNames CPUNames[] = {
116116#define ARM_CPU_NAME (NAME, ID, DEFAULT_FPU, IS_DEFAULT, DEFAULT_EXT ) \
117117 {NAME, ARM::ArchKind::ID, IS_DEFAULT, DEFAULT_EXT},
118118#include " ARMTargetParser.def"
@@ -173,7 +173,7 @@ struct FPUName {
173173 FPURestriction Restriction;
174174};
175175
176- static const FPUName FPUNames[] = {
176+ static constexpr FPUName FPUNames[] = {
177177#define ARM_FPU (NAME, KIND, VERSION, NEON_SUPPORT, RESTRICTION ) \
178178 {NAME, KIND, VERSION, NEON_SUPPORT, RESTRICTION},
179179#include " llvm/TargetParser/ARMTargetParser.def"
@@ -199,7 +199,7 @@ struct ArchNames {
199199 StringRef getSubArch () const { return ArchFeature.substr (1 ); }
200200};
201201
202- static const ArchNames ARMArchNames[] = {
202+ static constexpr ArchNames ARMArchNames[] = {
203203#define ARM_ARCH (NAME, ID, CPU_ATTR, ARCH_FEATURE, ARCH_ATTR, ARCH_FPU, \
204204 ARCH_BASE_EXT) \
205205 {NAME, CPU_ATTR, ARCH_FEATURE, ARCH_FPU, \
0 commit comments