Skip to content

Commit cb11420

Browse files
[Support] Simplify macro conditions involving __GNUC__ (NFC) (llvm#155070)
We require GCC 7.4 these days, so we just need to check for defined(__GNUC__).
1 parent 356be1a commit cb11420

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

llvm/lib/Support/BLAKE3/blake3_neon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ INLINE uint32x4_t rot8_128(uint32x4_t x) {
5454
// return vorrq_u32(vshrq_n_u32(x, 8), vshlq_n_u32(x, 32 - 8));
5555
#if defined(__clang__)
5656
return vreinterpretq_u32_u8(__builtin_shufflevector(vreinterpretq_u8_u32(x), vreinterpretq_u8_u32(x), 1,2,3,0,5,6,7,4,9,10,11,8,13,14,15,12));
57-
#elif __GNUC__ * 10000 + __GNUC_MINOR__ * 100 >=40700
57+
#elif defined(__GNUC__)
5858
static const uint8x16_t r8 = {1,2,3,0,5,6,7,4,9,10,11,8,13,14,15,12};
5959
return vreinterpretq_u32_u8(__builtin_shuffle(vreinterpretq_u8_u32(x), vreinterpretq_u8_u32(x), r8));
6060
#else

llvm/lib/Support/ConvertUTF.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
# define ConvertUTF_RESTORE_WARNINGS \
8080
_Pragma("clang diagnostic pop")
8181
# endif
82-
#elif defined(__GNUC__) && __GNUC__ > 6
82+
#elif defined(__GNUC__)
8383
# define ConvertUTF_DISABLE_WARNINGS \
8484
_Pragma("GCC diagnostic push") \
8585
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")

llvm/unittests/Support/AlignOfTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace {
3030
#ifdef __clang__
3131
#pragma clang diagnostic ignored "-Wunknown-pragmas"
3232
#pragma clang diagnostic ignored "-Winaccessible-base"
33-
#elif ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
33+
#elif defined(__GNUC__)
3434
// Pragma based warning suppression was introduced in GGC 4.2. Additionally
3535
// this warning is "enabled by default". The warning still appears if -Wall is
3636
// suppressed. Apparently GCC suppresses it when -w is specifed, which is odd.

0 commit comments

Comments
 (0)