File tree Expand file tree Collapse file tree 4 files changed +27
-3
lines changed
utils/bazel/llvm-project-overlay/libc Expand file tree Collapse file tree 4 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -103,23 +103,24 @@ add_header_library(
103
103
type_traits
104
104
HDRS
105
105
type_traits.h
106
- type_traits/always_false.h
107
106
type_traits/add_lvalue_reference.h
108
107
type_traits/add_pointer.h
109
108
type_traits/add_rvalue_reference.h
109
+ type_traits/always_false.h
110
110
type_traits/bool_constant.h
111
111
type_traits/conditional.h
112
112
type_traits/decay.h
113
113
type_traits/enable_if.h
114
114
type_traits/false_type.h
115
115
type_traits/integral_constant.h
116
- type_traits/invoke.h
117
116
type_traits/invoke_result.h
117
+ type_traits/invoke.h
118
118
type_traits/is_arithmetic.h
119
119
type_traits/is_array.h
120
120
type_traits/is_base_of.h
121
121
type_traits/is_class.h
122
122
type_traits/is_const.h
123
+ type_traits/is_constant_evaluated.h
123
124
type_traits/is_convertible.h
124
125
type_traits/is_destructible.h
125
126
type_traits/is_enum.h
Original file line number Diff line number Diff line change 25
25
#include " src/__support/CPP/type_traits/is_base_of.h"
26
26
#include " src/__support/CPP/type_traits/is_class.h"
27
27
#include " src/__support/CPP/type_traits/is_const.h"
28
+ #include " src/__support/CPP/type_traits/is_constant_evaluated.h"
28
29
#include " src/__support/CPP/type_traits/is_convertible.h"
29
30
#include " src/__support/CPP/type_traits/is_destructible.h"
30
31
#include " src/__support/CPP/type_traits/is_enum.h"
Original file line number Diff line number Diff line change
1
+ // ===-- is_constant_evaluated type_traits -----------------------*- C++ -*-===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ // ===----------------------------------------------------------------------===//
8
+ #ifndef LLVM_LIBC_SRC___SUPPORT_CPP_TYPE_TRAITS_IS_CONSTANT_EVALUATED_H
9
+ #define LLVM_LIBC_SRC___SUPPORT_CPP_TYPE_TRAITS_IS_CONSTANT_EVALUATED_H
10
+
11
+ #include " src/__support/macros/attributes.h"
12
+
13
+ namespace LIBC_NAMESPACE ::cpp {
14
+
15
+ LIBC_INLINE constexpr bool is_constant_evaluated () {
16
+ return __builtin_is_constant_evaluated ();
17
+ }
18
+
19
+ } // namespace LIBC_NAMESPACE::cpp
20
+
21
+ #endif // LLVM_LIBC_SRC___SUPPORT_CPP_TYPE_TRAITS_IS_CONSTANT_EVALUATED_H
Original file line number Diff line number Diff line change @@ -339,6 +339,7 @@ libc_support_library(
339
339
"src/__support/CPP/type_traits/is_base_of.h" ,
340
340
"src/__support/CPP/type_traits/is_class.h" ,
341
341
"src/__support/CPP/type_traits/is_const.h" ,
342
+ "src/__support/CPP/type_traits/is_constant_evaluated.h" ,
342
343
"src/__support/CPP/type_traits/is_convertible.h" ,
343
344
"src/__support/CPP/type_traits/is_destructible.h" ,
344
345
"src/__support/CPP/type_traits/is_enum.h" ,
@@ -743,12 +744,12 @@ libc_support_library(
743
744
deps = [
744
745
":__support_common" ,
745
746
":__support_cpp_bit" ,
746
- ":__support_sign" ,
747
747
":__support_cpp_type_traits" ,
748
748
":__support_libc_assert" ,
749
749
":__support_macros_attributes" ,
750
750
":__support_macros_properties_types" ,
751
751
":__support_math_extras" ,
752
+ ":__support_sign" ,
752
753
":__support_uint128" ,
753
754
],
754
755
)
You can’t perform that action at this time.
0 commit comments