Skip to content

Commit d92a484

Browse files
authored
[compiler-rt][AArch64][NFCI] Use CONSTRUCTOR_ATTRIBUTE in sme-abi-vg.c (#101159)
sme-abi-vg.c includes cpu_model/aarch64.h which includes cpu_model.h which has an equivalent define for `CONSTRUCTOR_ATTRIBUTE` that has the same checks for the GCC version that we repeat here. Just use that, rather than repeating the same logic.
1 parent d2b6a8e commit d92a484

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

compiler-rt/lib/builtins/aarch64/sme-abi-vg.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ struct FEATURES {
1010

1111
extern struct FEATURES __aarch64_cpu_features;
1212

13-
#if __GNUC__ >= 9
14-
#pragma GCC diagnostic ignored "-Wprio-ctor-dtor"
15-
#endif
16-
__attribute__((constructor(90))) static void get_aarch64_cpu_features(void) {
13+
CONSTRUCTOR_ATTRIBUTE static void get_aarch64_cpu_features(void) {
1714
if (__atomic_load_n(&__aarch64_cpu_features.features, __ATOMIC_RELAXED))
1815
return;
1916

0 commit comments

Comments
 (0)