File tree Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Expand file tree Collapse file tree 3 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,7 @@ namespace LIBC_NAMESPACE_DECL {
15
15
namespace cpp {
16
16
17
17
LIBC_INLINE constexpr bool is_constant_evaluated () {
18
- #if LIBC_HAS_BUILTIN(__builtin_is_constant_evaluated)
19
18
return __builtin_is_constant_evaluated ();
20
- #else
21
- return false ;
22
- #endif
23
19
}
24
20
25
21
} // namespace cpp
Original file line number Diff line number Diff line change 15
15
#ifndef LLVM_LIBC_SRC___SUPPORT_RPC_RPC_SERVER_H
16
16
#define LLVM_LIBC_SRC___SUPPORT_RPC_RPC_SERVER_H
17
17
18
+ #include " src/__support/macros/properties/compiler.h"
19
+
18
20
// Workaround for missing __has_builtin in < GCC 10.
19
21
#ifndef __has_builtin
20
22
#define __has_builtin (x ) 0
21
23
#endif
22
24
23
25
// Workaround for missing __builtin_is_constant_evaluated in < GCC 10.
24
- #ifndef __builtin_is_constant_evaluated
26
+ // Also this builtin is defined for GCC 9.
27
+ #if !(__has_builtin(__builtin_is_constant_evaluated) || \
28
+ (defined(LIBC_COMPILER_IS_GCC) && (LIBC_COMPILER_GCC_VER >= 900 )))
25
29
#define __builtin_is_constant_evaluated (x ) 0
26
30
#endif
27
31
Original file line number Diff line number Diff line change 48
48
#define LIBC_PREFERED_TYPE (TYPE )
49
49
#endif
50
50
51
- #ifndef __has_builtin
52
- #define LIBC_HAS_BUILTIN (X ) 0
53
- #else
54
- #define LIBC_HAS_BUILTIN (X ) __has_builtin(X)
55
- #endif
56
-
57
51
#endif // LLVM_LIBC_SRC___SUPPORT_MACROS_ATTRIBUTES_H
You can’t perform that action at this time.
0 commit comments