Skip to content

Commit a3f21a3

Browse files
authored
[libc] Remove LIBC_HAS_ATTRIBUTE macro (#86656)
Resolves #86547 Replace occurrences of the macro `LIBC_HAS_ATTRIBUTE` with `__has_attribute`.
1 parent 2d97ba2 commit a3f21a3

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

libc/src/__support/macros/config.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,4 @@
3939
#define LIBC_HAS_FEATURE(f) 0
4040
#endif
4141

42-
// Compiler attribute-detection.
43-
// https://clang.llvm.org/docs/LanguageExtensions.html#has-attribute
44-
#ifdef __has_attribute
45-
#define LIBC_HAS_ATTRIBUTE(f) __has_attribute(f)
46-
#else
47-
#define LIBC_HAS_ATTRIBUTE(f) 0
48-
#endif
49-
5042
#endif // LLVM_LIBC_SRC___SUPPORT_MACROS_CONFIG_H

libc/test/src/__support/arg_list_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ TEST(LlvmLibcArgListTest, TestStructTypes) {
120120
}
121121

122122
// Test vector extensions from clang.
123-
#if LIBC_HAS_ATTRIBUTE(ext_vector_type)
123+
#if __has_attribute(ext_vector_type)
124124

125125
using int1 = int __attribute__((ext_vector_type(1)));
126126
using int2 = int __attribute__((ext_vector_type(2)));

0 commit comments

Comments
 (0)