@@ -84,12 +84,29 @@ Error ARMAttributeParser::stringAttribute(AttrType tag) {
84
84
return Error::success ();
85
85
}
86
86
87
- static const char *CPU_arch_strings[] = {
88
- " Pre-v4" , " ARM v4" , " ARM v4T" , " ARM v5T" , " ARM v5TE" , " ARM v5TEJ" ,
89
- " ARM v6" , " ARM v6KZ" , " ARM v6T2" , " ARM v6K" , " ARM v7" , " ARM v6-M" ,
90
- " ARM v6S-M" , " ARM v7E-M" , " ARM v8-A" , " ARM v8-R" , " ARM v8-M Baseline" ,
91
- " ARM v8-M Mainline" , nullptr , nullptr , nullptr , " ARM v8.1-M Mainline" ,
92
- " ARM v9-A" };
87
+ static const char *const CPU_arch_strings[] = {" Pre-v4" ,
88
+ " ARM v4" ,
89
+ " ARM v4T" ,
90
+ " ARM v5T" ,
91
+ " ARM v5TE" ,
92
+ " ARM v5TEJ" ,
93
+ " ARM v6" ,
94
+ " ARM v6KZ" ,
95
+ " ARM v6T2" ,
96
+ " ARM v6K" ,
97
+ " ARM v7" ,
98
+ " ARM v6-M" ,
99
+ " ARM v6S-M" ,
100
+ " ARM v7E-M" ,
101
+ " ARM v8-A" ,
102
+ " ARM v8-R" ,
103
+ " ARM v8-M Baseline" ,
104
+ " ARM v8-M Mainline" ,
105
+ nullptr ,
106
+ nullptr ,
107
+ nullptr ,
108
+ " ARM v8.1-M Mainline" ,
109
+ " ARM v9-A" };
93
110
94
111
Error ARMAttributeParser::CPU_arch (AttrType tag) {
95
112
return parseStringAttribute (" CPU_arch" , tag, ArrayRef (CPU_arch_strings));
@@ -113,101 +130,109 @@ Error ARMAttributeParser::CPU_arch_profile(AttrType tag) {
113
130
}
114
131
115
132
Error ARMAttributeParser::ARM_ISA_use (AttrType tag) {
116
- static const char *strings[] = {" Not Permitted" , " Permitted" };
133
+ static const char *const strings[] = {" Not Permitted" , " Permitted" };
117
134
return parseStringAttribute (" ARM_ISA_use" , tag, ArrayRef (strings));
118
135
}
119
136
120
137
Error ARMAttributeParser::THUMB_ISA_use (AttrType tag) {
121
- static const char *strings[] = {" Not Permitted" , " Thumb-1" , " Thumb-2" , " Permitted" };
138
+ static const char *const strings[] = {" Not Permitted" , " Thumb-1" , " Thumb-2" ,
139
+ " Permitted" };
122
140
return parseStringAttribute (" THUMB_ISA_use" , tag, ArrayRef (strings));
123
141
}
124
142
125
143
Error ARMAttributeParser::FP_arch (AttrType tag) {
126
- static const char *strings[] = {
144
+ static const char *const strings[] = {
127
145
" Not Permitted" , " VFPv1" , " VFPv2" , " VFPv3" , " VFPv3-D16" ,
128
146
" VFPv4" , " VFPv4-D16" , " ARMv8-a FP" , " ARMv8-a FP-D16" };
129
147
return parseStringAttribute (" FP_arch" , tag, ArrayRef (strings));
130
148
}
131
149
132
150
Error ARMAttributeParser::WMMX_arch (AttrType tag) {
133
- static const char *strings[] = {" Not Permitted" , " WMMXv1" , " WMMXv2" };
151
+ static const char *const strings[] = {" Not Permitted" , " WMMXv1" , " WMMXv2" };
134
152
return parseStringAttribute (" WMMX_arch" , tag, ArrayRef (strings));
135
153
}
136
154
137
155
Error ARMAttributeParser::Advanced_SIMD_arch (AttrType tag) {
138
- static const char *strings[] = {" Not Permitted" , " NEONv1" , " NEONv2+FMA" ,
139
- " ARMv8-a NEON" , " ARMv8.1-a NEON" };
156
+ static const char *const strings[] = {" Not Permitted" , " NEONv1" , " NEONv2+FMA" ,
157
+ " ARMv8-a NEON" , " ARMv8.1-a NEON" };
140
158
return parseStringAttribute (" Advanced_SIMD_arch" , tag, ArrayRef (strings));
141
159
}
142
160
143
161
Error ARMAttributeParser::MVE_arch (AttrType tag) {
144
- static const char *strings[] = {" Not Permitted" , " MVE integer" ,
145
- " MVE integer and float" };
162
+ static const char *const strings[] = {" Not Permitted" , " MVE integer" ,
163
+ " MVE integer and float" };
146
164
return parseStringAttribute (" MVE_arch" , tag, ArrayRef (strings));
147
165
}
148
166
149
167
Error ARMAttributeParser::PCS_config (AttrType tag) {
150
- static const char *strings[] = {
151
- " None" , " Bare Platform" , " Linux Application" , " Linux DSO" , " Palm OS 2004" ,
152
- " Reserved (Palm OS)" , " Symbian OS 2004" , " Reserved (Symbian OS)" };
168
+ static const char *const strings[] = {" None" ,
169
+ " Bare Platform" ,
170
+ " Linux Application" ,
171
+ " Linux DSO" ,
172
+ " Palm OS 2004" ,
173
+ " Reserved (Palm OS)" ,
174
+ " Symbian OS 2004" ,
175
+ " Reserved (Symbian OS)" };
153
176
return parseStringAttribute (" PCS_config" , tag, ArrayRef (strings));
154
177
}
155
178
156
179
Error ARMAttributeParser::ABI_PCS_R9_use (AttrType tag) {
157
- static const char *strings[] = {" v6" , " Static Base" , " TLS" , " Unused" };
180
+ static const char *const strings[] = {" v6" , " Static Base" , " TLS" , " Unused" };
158
181
return parseStringAttribute (" ABI_PCS_R9_use" , tag, ArrayRef (strings));
159
182
}
160
183
161
184
Error ARMAttributeParser::ABI_PCS_RW_data (AttrType tag) {
162
- static const char *strings[] = {" Absolute" , " PC-relative " , " SB -relative" ,
163
- " Not Permitted" };
185
+ static const char *const strings[] = {" Absolute" , " PC-relative" ,
186
+ " SB-relative " , " Not Permitted" };
164
187
return parseStringAttribute (" ABI_PCS_RW_data" , tag, ArrayRef (strings));
165
188
}
166
189
167
190
Error ARMAttributeParser::ABI_PCS_RO_data (AttrType tag) {
168
- static const char *strings[] = {" Absolute" , " PC-relative" , " Not Permitted" };
191
+ static const char *const strings[] = {" Absolute" , " PC-relative" ,
192
+ " Not Permitted" };
169
193
return parseStringAttribute (" ABI_PCS_RO_data" , tag, ArrayRef (strings));
170
194
}
171
195
172
196
Error ARMAttributeParser::ABI_PCS_GOT_use (AttrType tag) {
173
- static const char *strings[] = {" Not Permitted" , " Direct" , " GOT-Indirect" };
197
+ static const char *const strings[] = {" Not Permitted" , " Direct" ,
198
+ " GOT-Indirect" };
174
199
return parseStringAttribute (" ABI_PCS_GOT_use" , tag, ArrayRef (strings));
175
200
}
176
201
177
202
Error ARMAttributeParser::ABI_PCS_wchar_t (AttrType tag) {
178
- static const char *strings[] = {" Not Permitted" , " Unknown" , " 2-byte" ,
179
- " Unknown" , " 4-byte" };
203
+ static const char *const strings[] = {" Not Permitted" , " Unknown" , " 2-byte" ,
204
+ " Unknown" , " 4-byte" };
180
205
return parseStringAttribute (" ABI_PCS_wchar_t" , tag, ArrayRef (strings));
181
206
}
182
207
183
208
Error ARMAttributeParser::ABI_FP_rounding (AttrType tag) {
184
- static const char *strings[] = {" IEEE-754" , " Runtime" };
209
+ static const char *const strings[] = {" IEEE-754" , " Runtime" };
185
210
return parseStringAttribute (" ABI_FP_rounding" , tag, ArrayRef (strings));
186
211
}
187
212
188
213
Error ARMAttributeParser::ABI_FP_denormal (AttrType tag) {
189
- static const char *strings[] = {" Unsupported" , " IEEE-754" , " Sign Only" };
214
+ static const char *const strings[] = {" Unsupported" , " IEEE-754" , " Sign Only" };
190
215
return parseStringAttribute (" ABI_FP_denormal" , tag, ArrayRef (strings));
191
216
}
192
217
193
218
Error ARMAttributeParser::ABI_FP_exceptions (AttrType tag) {
194
- static const char *strings[] = {" Not Permitted" , " IEEE-754" };
219
+ static const char *const strings[] = {" Not Permitted" , " IEEE-754" };
195
220
return parseStringAttribute (" ABI_FP_exceptions" , tag, ArrayRef (strings));
196
221
}
197
222
Error ARMAttributeParser::ABI_FP_user_exceptions (AttrType tag) {
198
- static const char *strings[] = {" Not Permitted" , " IEEE-754" };
223
+ static const char *const strings[] = {" Not Permitted" , " IEEE-754" };
199
224
return parseStringAttribute (" ABI_FP_user_exceptions" , tag, ArrayRef (strings));
200
225
}
201
226
202
227
Error ARMAttributeParser::ABI_FP_number_model (AttrType tag) {
203
- static const char *strings[] = {" Not Permitted" , " Finite Only" , " RTABI" ,
204
- " IEEE-754" };
228
+ static const char *const strings[] = {" Not Permitted" , " Finite Only" , " RTABI" ,
229
+ " IEEE-754" };
205
230
return parseStringAttribute (" ABI_FP_number_model" , tag, ArrayRef (strings));
206
231
}
207
232
208
233
Error ARMAttributeParser::ABI_align_needed (AttrType tag) {
209
- static const char *strings[] = {" Not Permitted" , " 8-byte alignment" ,
210
- " 4-byte alignment" , " Reserved" };
234
+ static const char *const strings[] = {" Not Permitted" , " 8-byte alignment" ,
235
+ " 4-byte alignment" , " Reserved" };
211
236
212
237
uint64_t value = de.getULEB128 (cursor);
213
238
@@ -244,38 +269,38 @@ Error ARMAttributeParser::ABI_align_preserved(AttrType tag) {
244
269
}
245
270
246
271
Error ARMAttributeParser::ABI_enum_size (AttrType tag) {
247
- static const char *strings[] = {" Not Permitted" , " Packed" , " Int32" ,
248
- " External Int32" };
272
+ static const char *const strings[] = {" Not Permitted" , " Packed" , " Int32" ,
273
+ " External Int32" };
249
274
return parseStringAttribute (" ABI_enum_size" , tag, ArrayRef (strings));
250
275
}
251
276
252
277
Error ARMAttributeParser::ABI_HardFP_use (AttrType tag) {
253
- static const char *strings[] = {" Tag_FP_arch" , " Single-Precision" , " Reserved " ,
254
- " Tag_FP_arch (deprecated)" };
278
+ static const char *const strings[] = {" Tag_FP_arch" , " Single-Precision" ,
279
+ " Reserved " , " Tag_FP_arch (deprecated)" };
255
280
return parseStringAttribute (" ABI_HardFP_use" , tag, ArrayRef (strings));
256
281
}
257
282
258
283
Error ARMAttributeParser::ABI_VFP_args (AttrType tag) {
259
- static const char *strings[] = {" AAPCS" , " AAPCS VFP" , " Custom" ,
260
- " Not Permitted" };
284
+ static const char *const strings[] = {" AAPCS" , " AAPCS VFP" , " Custom" ,
285
+ " Not Permitted" };
261
286
return parseStringAttribute (" ABI_VFP_args" , tag, ArrayRef (strings));
262
287
}
263
288
264
289
Error ARMAttributeParser::ABI_WMMX_args (AttrType tag) {
265
- static const char *strings[] = {" AAPCS" , " iWMMX" , " Custom" };
290
+ static const char *const strings[] = {" AAPCS" , " iWMMX" , " Custom" };
266
291
return parseStringAttribute (" ABI_WMMX_args" , tag, ArrayRef (strings));
267
292
}
268
293
269
294
Error ARMAttributeParser::ABI_optimization_goals (AttrType tag) {
270
- static const char *strings[] = {
271
- " None" , " Speed" , " Aggressive Speed " , " Size " , " Aggressive Size " , " Debugging " ,
272
- " Best Debugging"
273
- };
295
+ static const char *const strings[] = {
296
+ " None" , " Speed" , " Aggressive Speed " ,
297
+ " Size " , " Aggressive Size " , " Debugging" ,
298
+ " Best Debugging " };
274
299
return parseStringAttribute (" ABI_optimization_goals" , tag, ArrayRef (strings));
275
300
}
276
301
277
302
Error ARMAttributeParser::ABI_FP_optimization_goals (AttrType tag) {
278
- static const char *strings[] = {
303
+ static const char *const strings[] = {
279
304
" None" , " Speed" , " Aggressive Speed" , " Size" , " Aggressive Size" ,
280
305
" Accuracy" , " Best Accuracy" };
281
306
return parseStringAttribute (" ABI_FP_optimization_goals" , tag,
@@ -309,66 +334,67 @@ Error ARMAttributeParser::compatibility(AttrType tag) {
309
334
}
310
335
311
336
Error ARMAttributeParser::CPU_unaligned_access (AttrType tag) {
312
- static const char *strings[] = {" Not Permitted" , " v6-style" };
337
+ static const char *const strings[] = {" Not Permitted" , " v6-style" };
313
338
return parseStringAttribute (" CPU_unaligned_access" , tag, ArrayRef (strings));
314
339
}
315
340
316
341
Error ARMAttributeParser::FP_HP_extension (AttrType tag) {
317
- static const char *strings[] = {" If Available" , " Permitted" };
342
+ static const char *const strings[] = {" If Available" , " Permitted" };
318
343
return parseStringAttribute (" FP_HP_extension" , tag, ArrayRef (strings));
319
344
}
320
345
321
346
Error ARMAttributeParser::ABI_FP_16bit_format (AttrType tag) {
322
- static const char *strings[] = {" Not Permitted" , " IEEE-754" , " VFPv3" };
347
+ static const char *const strings[] = {" Not Permitted" , " IEEE-754" , " VFPv3" };
323
348
return parseStringAttribute (" ABI_FP_16bit_format" , tag, ArrayRef (strings));
324
349
}
325
350
326
351
Error ARMAttributeParser::MPextension_use (AttrType tag) {
327
- static const char *strings[] = {" Not Permitted" , " Permitted" };
352
+ static const char *const strings[] = {" Not Permitted" , " Permitted" };
328
353
return parseStringAttribute (" MPextension_use" , tag, ArrayRef (strings));
329
354
}
330
355
331
356
Error ARMAttributeParser::DIV_use (AttrType tag) {
332
- static const char *strings[] = {" If Available" , " Not Permitted" , " Permitted" };
357
+ static const char *const strings[] = {" If Available" , " Not Permitted" ,
358
+ " Permitted" };
333
359
return parseStringAttribute (" DIV_use" , tag, ArrayRef (strings));
334
360
}
335
361
336
362
Error ARMAttributeParser::DSP_extension (AttrType tag) {
337
- static const char *strings[] = {" Not Permitted" , " Permitted" };
363
+ static const char *const strings[] = {" Not Permitted" , " Permitted" };
338
364
return parseStringAttribute (" DSP_extension" , tag, ArrayRef (strings));
339
365
}
340
366
341
367
Error ARMAttributeParser::T2EE_use (AttrType tag) {
342
- static const char *strings[] = {" Not Permitted" , " Permitted" };
368
+ static const char *const strings[] = {" Not Permitted" , " Permitted" };
343
369
return parseStringAttribute (" T2EE_use" , tag, ArrayRef (strings));
344
370
}
345
371
346
372
Error ARMAttributeParser::Virtualization_use (AttrType tag) {
347
- static const char *strings[] = {" Not Permitted " , " TrustZone " ,
348
- " Virtualization Extensions" ,
349
- " TrustZone + Virtualization Extensions" };
373
+ static const char *const strings[] = {
374
+ " Not Permitted " , " TrustZone " , " Virtualization Extensions" ,
375
+ " TrustZone + Virtualization Extensions" };
350
376
return parseStringAttribute (" Virtualization_use" , tag, ArrayRef (strings));
351
377
}
352
378
353
379
Error ARMAttributeParser::PAC_extension (ARMBuildAttrs::AttrType tag) {
354
- static const char *strings[] = {" Not Permitted" , " Permitted in NOP space " ,
355
- " Permitted" };
380
+ static const char *const strings[] = {" Not Permitted" ,
381
+ " Permitted in NOP space " , " Permitted" };
356
382
return parseStringAttribute (" PAC_extension" , tag, ArrayRef (strings));
357
383
}
358
384
359
385
Error ARMAttributeParser::BTI_extension (ARMBuildAttrs::AttrType tag) {
360
- static const char *strings[] = {" Not Permitted" , " Permitted in NOP space " ,
361
- " Permitted" };
386
+ static const char *const strings[] = {" Not Permitted" ,
387
+ " Permitted in NOP space " , " Permitted" };
362
388
return parseStringAttribute (" BTI_extension" , tag, ArrayRef (strings));
363
389
}
364
390
365
391
Error ARMAttributeParser::PACRET_use (ARMBuildAttrs::AttrType tag) {
366
- static const char *strings[] = {" Not Used" , " Used" };
392
+ static const char *const strings[] = {" Not Used" , " Used" };
367
393
return parseStringAttribute (" PACRET_use" , tag, ArrayRef (strings));
368
394
}
369
395
370
396
Error ARMAttributeParser::BTI_use (ARMBuildAttrs::AttrType tag) {
371
- static const char *strings[] = {" Not Used" , " Used" };
397
+ static const char *const strings[] = {" Not Used" , " Used" };
372
398
return parseStringAttribute (" BTI_use" , tag, ArrayRef (strings));
373
399
}
374
400
0 commit comments