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(
103103 type_traits
104104 HDRS
105105 type_traits.h
106- type_traits/always_false.h
107106 type_traits/add_lvalue_reference.h
108107 type_traits/add_pointer.h
109108 type_traits/add_rvalue_reference.h
109+ type_traits/always_false.h
110110 type_traits/bool_constant.h
111111 type_traits/conditional.h
112112 type_traits/decay.h
113113 type_traits/enable_if.h
114114 type_traits/false_type.h
115115 type_traits/integral_constant.h
116- type_traits/invoke.h
117116 type_traits/invoke_result.h
117+ type_traits/invoke.h
118118 type_traits/is_arithmetic.h
119119 type_traits/is_array.h
120120 type_traits/is_base_of.h
121121 type_traits/is_class.h
122122 type_traits/is_const.h
123+ type_traits/is_constant_evaluated.h
123124 type_traits/is_convertible.h
124125 type_traits/is_destructible.h
125126 type_traits/is_enum.h
Original file line number Diff line number Diff line change 2525#include " src/__support/CPP/type_traits/is_base_of.h"
2626#include " src/__support/CPP/type_traits/is_class.h"
2727#include " src/__support/CPP/type_traits/is_const.h"
28+ #include " src/__support/CPP/type_traits/is_constant_evaluated.h"
2829#include " src/__support/CPP/type_traits/is_convertible.h"
2930#include " src/__support/CPP/type_traits/is_destructible.h"
3031#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(
339339 "src/__support/CPP/type_traits/is_base_of.h" ,
340340 "src/__support/CPP/type_traits/is_class.h" ,
341341 "src/__support/CPP/type_traits/is_const.h" ,
342+ "src/__support/CPP/type_traits/is_constant_evaluated.h" ,
342343 "src/__support/CPP/type_traits/is_convertible.h" ,
343344 "src/__support/CPP/type_traits/is_destructible.h" ,
344345 "src/__support/CPP/type_traits/is_enum.h" ,
@@ -743,12 +744,12 @@ libc_support_library(
743744 deps = [
744745 ":__support_common" ,
745746 ":__support_cpp_bit" ,
746- ":__support_sign" ,
747747 ":__support_cpp_type_traits" ,
748748 ":__support_libc_assert" ,
749749 ":__support_macros_attributes" ,
750750 ":__support_macros_properties_types" ,
751751 ":__support_math_extras" ,
752+ ":__support_sign" ,
752753 ":__support_uint128" ,
753754 ],
754755)
You can’t perform that action at this time.
0 commit comments