diff options
author | Schrodinger ZHU Yifan <yifanzhu@rochester.edu> | 2024-06-14 13:51:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-14 13:51:39 -0700 |
commit | 2146d12eb9401d488ad916fc9227b5f24bcfa5c4 (patch) | |
tree | e5befd29d0054edc173f714f551d488ee47c7fe7 /libc/src | |
parent | 2f18381b905ab3a7872ac518bf19f6f3afb333df (diff) | |
download | llvm-2146d12eb9401d488ad916fc9227b5f24bcfa5c4.zip llvm-2146d12eb9401d488ad916fc9227b5f24bcfa5c4.tar.gz llvm-2146d12eb9401d488ad916fc9227b5f24bcfa5c4.tar.bz2 |
[libc] fix preferred_type attribute detection (#95599)
Diffstat (limited to 'libc/src')
-rw-r--r-- | libc/src/__support/macros/attributes.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/src/__support/macros/attributes.h b/libc/src/__support/macros/attributes.h index 7e8e2dd..c647467 100644 --- a/libc/src/__support/macros/attributes.h +++ b/libc/src/__support/macros/attributes.h @@ -42,7 +42,7 @@ #define LIBC_CONSTINIT #endif -#ifdef __clang__ +#if defined(__clang__) && __has_attribute(preferred_type) #define LIBC_PREFERED_TYPE(TYPE) [[clang::preferred_type(TYPE)]] #else #define LIBC_PREFERED_TYPE(TYPE) |