-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[libc++][C++03] Update include guards #109001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
✅ With the latest revision this PR passed the C/C++ code formatter. |
@llvm/pr-subscribers-libcxx Author: Nikolas Klauser (philnik777) ChangesPatch is 1.10 MiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/109001.diff 1015 Files Affected:
diff --git a/libcxx/include/__cxx03/__algorithm/adjacent_find.h b/libcxx/include/__cxx03/__algorithm/adjacent_find.h
index 88036db84de899..6add0f3fe2b53a 100644
--- a/libcxx/include/__cxx03/__algorithm/adjacent_find.h
+++ b/libcxx/include/__cxx03/__algorithm/adjacent_find.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_ADJACENT_FIND_H
-#define _LIBCPP___ALGORITHM_ADJACENT_FIND_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_ADJACENT_FIND_H
+#define _LIBCPP___CXX03___ALGORITHM_ADJACENT_FIND_H
#include <__cxx03/__algorithm/comp.h>
#include <__cxx03/__algorithm/iterator_operations.h>
@@ -55,4 +55,4 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP___ALGORITHM_ADJACENT_FIND_H
+#endif // _LIBCPP___CXX03___ALGORITHM_ADJACENT_FIND_H
diff --git a/libcxx/include/__cxx03/__algorithm/all_of.h b/libcxx/include/__cxx03/__algorithm/all_of.h
index b32d97241506e0..fe46ee5fca43cf 100644
--- a/libcxx/include/__cxx03/__algorithm/all_of.h
+++ b/libcxx/include/__cxx03/__algorithm/all_of.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_ALL_OF_H
-#define _LIBCPP___ALGORITHM_ALL_OF_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_ALL_OF_H
+#define _LIBCPP___CXX03___ALGORITHM_ALL_OF_H
#include <__cxx03/__config>
@@ -29,4 +29,4 @@ all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_ALL_OF_H
+#endif // _LIBCPP___CXX03___ALGORITHM_ALL_OF_H
diff --git a/libcxx/include/__cxx03/__algorithm/any_of.h b/libcxx/include/__cxx03/__algorithm/any_of.h
index bd7de96fbef40c..26bf3996e8a6f0 100644
--- a/libcxx/include/__cxx03/__algorithm/any_of.h
+++ b/libcxx/include/__cxx03/__algorithm/any_of.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_ANY_OF_H
-#define _LIBCPP___ALGORITHM_ANY_OF_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_ANY_OF_H
+#define _LIBCPP___CXX03___ALGORITHM_ANY_OF_H
#include <__cxx03/__config>
@@ -29,4 +29,4 @@ any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_ANY_OF_H
+#endif // _LIBCPP___CXX03___ALGORITHM_ANY_OF_H
diff --git a/libcxx/include/__cxx03/__algorithm/binary_search.h b/libcxx/include/__cxx03/__algorithm/binary_search.h
index a93c62b32d7428..a72da8e3966394 100644
--- a/libcxx/include/__cxx03/__algorithm/binary_search.h
+++ b/libcxx/include/__cxx03/__algorithm/binary_search.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_BINARY_SEARCH_H
-#define _LIBCPP___ALGORITHM_BINARY_SEARCH_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_BINARY_SEARCH_H
+#define _LIBCPP___CXX03___ALGORITHM_BINARY_SEARCH_H
#include <__cxx03/__algorithm/comp.h>
#include <__cxx03/__algorithm/comp_ref_type.h>
@@ -36,4 +36,4 @@ binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __va
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_BINARY_SEARCH_H
+#endif // _LIBCPP___CXX03___ALGORITHM_BINARY_SEARCH_H
diff --git a/libcxx/include/__cxx03/__algorithm/clamp.h b/libcxx/include/__cxx03/__algorithm/clamp.h
index e5e4dbf774dc31..0e4bb0eb6b9508 100644
--- a/libcxx/include/__cxx03/__algorithm/clamp.h
+++ b/libcxx/include/__cxx03/__algorithm/clamp.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_CLAMP_H
-#define _LIBCPP___ALGORITHM_CLAMP_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_CLAMP_H
+#define _LIBCPP___CXX03___ALGORITHM_CLAMP_H
#include <__cxx03/__algorithm/comp.h>
#include <__cxx03/__assert>
@@ -41,4 +41,4 @@ clamp(_LIBCPP_LIFETIMEBOUND const _Tp& __v,
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_CLAMP_H
+#endif // _LIBCPP___CXX03___ALGORITHM_CLAMP_H
diff --git a/libcxx/include/__cxx03/__algorithm/comp.h b/libcxx/include/__cxx03/__algorithm/comp.h
index f01e395dc21ea5..0c638b4e4a651f 100644
--- a/libcxx/include/__cxx03/__algorithm/comp.h
+++ b/libcxx/include/__cxx03/__algorithm/comp.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_COMP_H
-#define _LIBCPP___ALGORITHM_COMP_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_COMP_H
+#define _LIBCPP___CXX03___ALGORITHM_COMP_H
#include <__cxx03/__config>
#include <__cxx03/__type_traits/desugars_to.h>
@@ -46,4 +46,4 @@ inline const bool __desugars_to_v<__less_tag, __less<>, _Tp, _Tp> = true;
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_COMP_H
+#endif // _LIBCPP___CXX03___ALGORITHM_COMP_H
diff --git a/libcxx/include/__cxx03/__algorithm/comp_ref_type.h b/libcxx/include/__cxx03/__algorithm/comp_ref_type.h
index 413bf30c6a64ce..ab793da0ad293c 100644
--- a/libcxx/include/__cxx03/__algorithm/comp_ref_type.h
+++ b/libcxx/include/__cxx03/__algorithm/comp_ref_type.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_COMP_REF_TYPE_H
-#define _LIBCPP___ALGORITHM_COMP_REF_TYPE_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_COMP_REF_TYPE_H
+#define _LIBCPP___CXX03___ALGORITHM_COMP_REF_TYPE_H
#include <__cxx03/__assert>
#include <__cxx03/__config>
@@ -64,4 +64,4 @@ using __comp_ref_type = _Comp&;
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_COMP_REF_TYPE_H
+#endif // _LIBCPP___CXX03___ALGORITHM_COMP_REF_TYPE_H
diff --git a/libcxx/include/__cxx03/__algorithm/copy.h b/libcxx/include/__cxx03/__algorithm/copy.h
index 6de8df3f980fea..2aa0ab78b78582 100644
--- a/libcxx/include/__cxx03/__algorithm/copy.h
+++ b/libcxx/include/__cxx03/__algorithm/copy.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_COPY_H
-#define _LIBCPP___ALGORITHM_COPY_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_COPY_H
+#define _LIBCPP___CXX03___ALGORITHM_COPY_H
#include <__cxx03/__algorithm/copy_move_common.h>
#include <__cxx03/__algorithm/for_each_segment.h>
@@ -120,4 +120,4 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP___ALGORITHM_COPY_H
+#endif // _LIBCPP___CXX03___ALGORITHM_COPY_H
diff --git a/libcxx/include/__cxx03/__algorithm/copy_backward.h b/libcxx/include/__cxx03/__algorithm/copy_backward.h
index dd7ff8ada5280c..9262d13d6c1758 100644
--- a/libcxx/include/__cxx03/__algorithm/copy_backward.h
+++ b/libcxx/include/__cxx03/__algorithm/copy_backward.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_COPY_BACKWARD_H
-#define _LIBCPP___ALGORITHM_COPY_BACKWARD_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_COPY_BACKWARD_H
+#define _LIBCPP___CXX03___ALGORITHM_COPY_BACKWARD_H
#include <__cxx03/__algorithm/copy_move_common.h>
#include <__cxx03/__algorithm/iterator_operations.h>
@@ -134,4 +134,4 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP___ALGORITHM_COPY_BACKWARD_H
+#endif // _LIBCPP___CXX03___ALGORITHM_COPY_BACKWARD_H
diff --git a/libcxx/include/__cxx03/__algorithm/copy_if.h b/libcxx/include/__cxx03/__algorithm/copy_if.h
index 345b12878d3333..2db0c26fb86be1 100644
--- a/libcxx/include/__cxx03/__algorithm/copy_if.h
+++ b/libcxx/include/__cxx03/__algorithm/copy_if.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_COPY_IF_H
-#define _LIBCPP___ALGORITHM_COPY_IF_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_COPY_IF_H
+#define _LIBCPP___CXX03___ALGORITHM_COPY_IF_H
#include <__cxx03/__config>
@@ -31,4 +31,4 @@ copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result,
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_COPY_IF_H
+#endif // _LIBCPP___CXX03___ALGORITHM_COPY_IF_H
diff --git a/libcxx/include/__cxx03/__algorithm/copy_move_common.h b/libcxx/include/__cxx03/__algorithm/copy_move_common.h
index c5983070251764..637b5a01daa75e 100644
--- a/libcxx/include/__cxx03/__algorithm/copy_move_common.h
+++ b/libcxx/include/__cxx03/__algorithm/copy_move_common.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_COPY_MOVE_COMMON_H
-#define _LIBCPP___ALGORITHM_COPY_MOVE_COMMON_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_COPY_MOVE_COMMON_H
+#define _LIBCPP___CXX03___ALGORITHM_COPY_MOVE_COMMON_H
#include <__cxx03/__algorithm/iterator_operations.h>
#include <__cxx03/__algorithm/unwrap_iter.h>
@@ -111,4 +111,4 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP___ALGORITHM_COPY_MOVE_COMMON_H
+#endif // _LIBCPP___CXX03___ALGORITHM_COPY_MOVE_COMMON_H
diff --git a/libcxx/include/__cxx03/__algorithm/copy_n.h b/libcxx/include/__cxx03/__algorithm/copy_n.h
index 14f14029443359..aedb232b1bd5e3 100644
--- a/libcxx/include/__cxx03/__algorithm/copy_n.h
+++ b/libcxx/include/__cxx03/__algorithm/copy_n.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_COPY_N_H
-#define _LIBCPP___ALGORITHM_COPY_N_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_COPY_N_H
+#define _LIBCPP___CXX03___ALGORITHM_COPY_N_H
#include <__cxx03/__algorithm/copy.h>
#include <__cxx03/__config>
@@ -57,4 +57,4 @@ copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result) {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_COPY_N_H
+#endif // _LIBCPP___CXX03___ALGORITHM_COPY_N_H
diff --git a/libcxx/include/__cxx03/__algorithm/count.h b/libcxx/include/__cxx03/__algorithm/count.h
index b7024dc8c63180..7c1fc3e5798980 100644
--- a/libcxx/include/__cxx03/__algorithm/count.h
+++ b/libcxx/include/__cxx03/__algorithm/count.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_COUNT_H
-#define _LIBCPP___ALGORITHM_COUNT_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_COUNT_H
+#define _LIBCPP___CXX03___ALGORITHM_COUNT_H
#include <__cxx03/__algorithm/iterator_operations.h>
#include <__cxx03/__algorithm/min.h>
@@ -89,4 +89,4 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP___ALGORITHM_COUNT_H
+#endif // _LIBCPP___CXX03___ALGORITHM_COUNT_H
diff --git a/libcxx/include/__cxx03/__algorithm/count_if.h b/libcxx/include/__cxx03/__algorithm/count_if.h
index eeb42052b08ae1..d333e861891763 100644
--- a/libcxx/include/__cxx03/__algorithm/count_if.h
+++ b/libcxx/include/__cxx03/__algorithm/count_if.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_COUNT_IF_H
-#define _LIBCPP___ALGORITHM_COUNT_IF_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_COUNT_IF_H
+#define _LIBCPP___CXX03___ALGORITHM_COUNT_IF_H
#include <__cxx03/__config>
#include <__cxx03/__iterator/iterator_traits.h>
@@ -32,4 +32,4 @@ count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_COUNT_IF_H
+#endif // _LIBCPP___CXX03___ALGORITHM_COUNT_IF_H
diff --git a/libcxx/include/__cxx03/__algorithm/equal.h b/libcxx/include/__cxx03/__algorithm/equal.h
index a4d0a999b18192..4e478932981e7b 100644
--- a/libcxx/include/__cxx03/__algorithm/equal.h
+++ b/libcxx/include/__cxx03/__algorithm/equal.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_EQUAL_H
-#define _LIBCPP___ALGORITHM_EQUAL_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_EQUAL_H
+#define _LIBCPP___CXX03___ALGORITHM_EQUAL_H
#include <__cxx03/__algorithm/comp.h>
#include <__cxx03/__algorithm/unwrap_iter.h>
@@ -130,4 +130,4 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP___ALGORITHM_EQUAL_H
+#endif // _LIBCPP___CXX03___ALGORITHM_EQUAL_H
diff --git a/libcxx/include/__cxx03/__algorithm/equal_range.h b/libcxx/include/__cxx03/__algorithm/equal_range.h
index 9abda2bd2e36f9..4b3126a2840cf4 100644
--- a/libcxx/include/__cxx03/__algorithm/equal_range.h
+++ b/libcxx/include/__cxx03/__algorithm/equal_range.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_EQUAL_RANGE_H
-#define _LIBCPP___ALGORITHM_EQUAL_RANGE_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_EQUAL_RANGE_H
+#define _LIBCPP___CXX03___ALGORITHM_EQUAL_RANGE_H
#include <__cxx03/__algorithm/comp.h>
#include <__cxx03/__algorithm/comp_ref_type.h>
@@ -82,4 +82,4 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP___ALGORITHM_EQUAL_RANGE_H
+#endif // _LIBCPP___CXX03___ALGORITHM_EQUAL_RANGE_H
diff --git a/libcxx/include/__cxx03/__algorithm/fill.h b/libcxx/include/__cxx03/__algorithm/fill.h
index 5da0f4457daa69..4aaf2744e8a585 100644
--- a/libcxx/include/__cxx03/__algorithm/fill.h
+++ b/libcxx/include/__cxx03/__algorithm/fill.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_FILL_H
-#define _LIBCPP___ALGORITHM_FILL_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_FILL_H
+#define _LIBCPP___CXX03___ALGORITHM_FILL_H
#include <__cxx03/__algorithm/fill_n.h>
#include <__cxx03/__config>
@@ -42,4 +42,4 @@ fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_FILL_H
+#endif // _LIBCPP___CXX03___ALGORITHM_FILL_H
diff --git a/libcxx/include/__cxx03/__algorithm/fill_n.h b/libcxx/include/__cxx03/__algorithm/fill_n.h
index fd548f27056a17..99b712c7b0360c 100644
--- a/libcxx/include/__cxx03/__algorithm/fill_n.h
+++ b/libcxx/include/__cxx03/__algorithm/fill_n.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_FILL_N_H
-#define _LIBCPP___ALGORITHM_FILL_N_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_FILL_N_H
+#define _LIBCPP___CXX03___ALGORITHM_FILL_N_H
#include <__cxx03/__algorithm/min.h>
#include <__cxx03/__config>
@@ -95,4 +95,4 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP___ALGORITHM_FILL_N_H
+#endif // _LIBCPP___CXX03___ALGORITHM_FILL_N_H
diff --git a/libcxx/include/__cxx03/__algorithm/find.h b/libcxx/include/__cxx03/__algorithm/find.h
index 7a48a449c897bb..ff5ac9b8b1bd0a 100644
--- a/libcxx/include/__cxx03/__algorithm/find.h
+++ b/libcxx/include/__cxx03/__algorithm/find.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_FIND_H
-#define _LIBCPP___ALGORITHM_FIND_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_FIND_H
+#define _LIBCPP___CXX03___ALGORITHM_FIND_H
#include <__cxx03/__algorithm/find_segment_if.h>
#include <__cxx03/__algorithm/min.h>
@@ -178,4 +178,4 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP___ALGORITHM_FIND_H
+#endif // _LIBCPP___CXX03___ALGORITHM_FIND_H
diff --git a/libcxx/include/__cxx03/__algorithm/find_end.h b/libcxx/include/__cxx03/__algorithm/find_end.h
index 34a45e2c66fae9..3fa046bd0df3ec 100644
--- a/libcxx/include/__cxx03/__algorithm/find_end.h
+++ b/libcxx/include/__cxx03/__algorithm/find_end.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_FIND_END_OF_H
-#define _LIBCPP___ALGORITHM_FIND_END_OF_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_FIND_END_OF_H
+#define _LIBCPP___CXX03___ALGORITHM_FIND_END_OF_H
#include <__cxx03/__algorithm/comp.h>
#include <__cxx03/__algorithm/iterator_operations.h>
@@ -222,4 +222,4 @@ find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_FIND_END_OF_H
+#endif // _LIBCPP___CXX03___ALGORITHM_FIND_END_OF_H
diff --git a/libcxx/include/__cxx03/__algorithm/find_first_of.h b/libcxx/include/__cxx03/__algorithm/find_first_of.h
index 05eb85fd663d27..b1b3e5f3be01e5 100644
--- a/libcxx/include/__cxx03/__algorithm/find_first_of.h
+++ b/libcxx/include/__cxx03/__algorithm/find_first_of.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_FIND_FIRST_OF_H
-#define _LIBCPP___ALGORITHM_FIND_FIRST_OF_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_FIND_FIRST_OF_H
+#define _LIBCPP___CXX03___ALGORITHM_FIND_FIRST_OF_H
#include <__cxx03/__algorithm/comp.h>
#include <__cxx03/__config>
@@ -52,4 +52,4 @@ _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Fo
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_FIND_FIRST_OF_H
+#endif // _LIBCPP___CXX03___ALGORITHM_FIND_FIRST_OF_H
diff --git a/libcxx/include/__cxx03/__algorithm/find_if.h b/libcxx/include/__cxx03/__algorithm/find_if.h
index b0150e539f9abc..ca4139c86787c0 100644
--- a/libcxx/include/__cxx03/__algorithm/find_if.h
+++ b/libcxx/include/__cxx03/__algorithm/find_if.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_FIND_IF_H
-#define _LIBCPP___ALGORITHM_FIND_IF_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_FIND_IF_H
+#define _LIBCPP___CXX03___ALGORITHM_FIND_IF_H
#include <__cxx03/__config>
@@ -29,4 +29,4 @@ find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_FIND_IF_H
+#endif // _LIBCPP___CXX03___ALGORITHM_FIND_IF_H
diff --git a/libcxx/include/__cxx03/__algorithm/find_if_not.h b/libcxx/include/__cxx03/__algorithm/find_if_not.h
index 67d9a7deb2edd9..a662dfbddfbb93 100644
--- a/libcxx/include/__cxx03/__algorithm/find_if_not.h
+++ b/libcxx/include/__cxx03/__algorithm/find_if_not.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_FIND_IF_NOT_H
-#define _LIBCPP___ALGORITHM_FIND_IF_NOT_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_FIND_IF_NOT_H
+#define _LIBCPP___CXX03___ALGORITHM_FIND_IF_NOT_H
#include <__cxx03/__config>
@@ -29,4 +29,4 @@ find_if_not(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_FIND_IF_NOT_H
+#endif // _LIBCPP___CXX03___ALGORITHM_FIND_IF_NOT_H
diff --git a/libcxx/include/__cxx03/__algorithm/find_segment_if.h b/libcxx/include/__cxx03/__algorithm/find_segment_if.h
index a6c016234418eb..3475e9e8bdacd6 100644
--- a/libcxx/include/__cxx03/__algorithm/find_segment_if.h
+++ b/libcxx/include/__cxx03/__algorithm/find_segment_if.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_FIND_SEGMENT_IF_H
-#define _LIBCPP___ALGORITHM_FIND_SEGMENT_IF_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_FIND_SEGMENT_IF_H
+#define _LIBCPP___CXX03___ALGORITHM_FIND_SEGMENT_IF_H
#include <__cxx03/__config>
#include <__cxx03/__iterator/segmented_iterator.h>
@@ -59,4 +59,4 @@ __find_segment_if(_SegmentedIterator __first, _SegmentedIterator __last, _Pred _
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP___ALGORITHM_FIND_SEGMENT_IF_H
+#endif // _LIBCPP___CXX03___ALGORITHM_FIND_SEGMENT_IF_H
diff --git a/libcxx/include/__cxx03/__algorithm/fold.h b/libcxx/include/__cxx03/__algorithm/fold.h
index 7e9c745bbbdb25..5ec0d747c009cb 100644
--- a/libcxx/include/__cxx03/__algorithm/fold.h
+++ b/libcxx/include/__cxx03/__algorithm/fold.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_FOLD_H
-#define _LIBCPP___ALGORITHM_FOLD_H
+#ifndef _LIBCPP___CXX03___ALGORITHM_FOLD_H
+#define _LIBCPP___CXX03___ALGORITHM_FOLD_H
#include <__cxx03/__concepts/assignable.h>
#include <__cxx03/__concepts/convertible_to.h>
@@ -125,4 +125,4 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP___ALGORITHM_FOLD_H
+#endif // _LIBCPP___CXX03___ALGORITHM_FOLD_H
diff --git a/libcxx/include/__cxx03/__algorithm/for_each.h b/libcxx/include/__cxx03/__algorithm/for_each.h
index d2b19310c60f55..a6faf805fe9cfb 100644
--- a/libcxx/include/__cxx03/__algorithm/for_each.h
+++ b/libcxx/include/__cxx03/__algorithm/for_each.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------...
[truncated]
|
a5c77e5
to
d5ea6d6
Compare
e888ef3
to
df30222
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me in principle, however the patch itself has a few incorrect renamings. One thing you could do is use git diff --stat
to confirm that all the changed files have exactly 3 lines changed in them. A few headers like the C compat headers might need additional renames, that needs to be investigated.
df30222
to
34d0b52
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, there are still many instances of _LIBCPP___CXX03_REQUIRE_
83f8c8d
to
bf624c9
Compare
bf624c9
to
bea0f2b
Compare
This updates libcxx and libcxxabi to LLVM 20.1.4: https://github.com/llvm/llvm-project/releases/tag/llvmorg-20.1.4 Before going into each additional change of the PR, these are some noteworthy changes from this LLVM release: - Freezing C++03 headers - RFC: https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc/77319 - PRs: - llvm/llvm-project#108999 - llvm/llvm-project#109000 - llvm/llvm-project#109001 - llvm/llvm-project#109002 - This copies libc++ headers of the last LLVM 19 release into a separate directory (https://github.com/llvm/llvm-project/tree/main/libcxx/include/__cxx03) and redirects all C++03 workflow there. The motivation is not to fix C++03 related changes unless they are critical bugs, and simplifies the main headers. So the main headers are like ``` #if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) # include <__cxx03/algorithm> #else ... main header content ... ``` As you can see it looks like we can avoid opting into this by not defining `_LIBCPP_USE_FROZEN_CXX03_HEADERS` at the moment. I think their eventual goal is to remove C++03 support from the main headers but it hasn't seem to have happened yet and I don't know what their timeline for that is. Adding that `__cxx03` directory increases the header size by 10MB. We can get away not using them by not defining `_LIBCPP_USE_FROZEN_CXX03_HEADERS` in this release, so this update does not include that directory. - Sharing of headers between libc++ and libc (Project Hand in Hand) - RFC: https://discourse.llvm.org/t/rfc-project-hand-in-hand-llvm-libc-libc-code-sharing/77701 - PR: llvm/llvm-project#91651 (More are likely to come) This tries to share some libc headers from libcxx. libcxx's source files can depend on headers from `libc/shared`, `libc/src/__support`, `libc/include/llvm-libc-macros`, and `libc/include/llvm-libc-types`. And it turns out libcxx can also depend on `libc/hdr`, even though the directory is not in the diagram in the RFC. These headers can be only included from `libcxx/src` and not `libcxx/include`, to prevent libcxx's API from changing. So these headers don't need to be copied into `cache/`. - Locale API reimplementation It doesn't seem to have an RFC, but the PRs are: - llvm/llvm-project#113737 - llvm/llvm-project#115176 - llvm/llvm-project#115752 - llvm/llvm-project#122489 It looks this aims provide a new way to define locale API for each platform. Currently Apple, FreeBSD, MSVCRT, and Fuschia are using the new API and the others are still using the old one: https://github.com/llvm/llvm-project/blob/ec28b8f9cc7f2ac187d8a617a6d08d5e56f9120e/libcxx/include/__locale_dir/locale_base_api.h#L116-L138 For our purpose, adding `if defined(__EMSCRIPTEN__)` entry to the list of "old" list seems to work for the moment, but we may need to move to the new way eventually later. --- Additional changes: - Copy `vendor/llvm/default_assertion_handler.in` to `__assertion_handler`: aa53648 Our previous `__assertion_handler` was copied from `libcxx/vendor/llvm/default_assertion_handler.in`. This updates our `__assertion_handler` to the new `libcxx/vendor/llvm/default_assertion_handler.in`. For what this file is, see the PR description of #22994, with which the file was added. - Remove `libcxx/include/__cxx03` directory: d646f6b As I described in "Freezing C++ headers" above, C++03 headers were copied to `include/cxx03` to be "frozen". But by not defining `_LIBCPP_USE_FROZEN_CXX03_HEADERS` we can still use the main headers. This new `__cxx03` header directory is almost 10M and we are not using it in this update, this deletes it. - Define more variables in `__config_site`: 9912236 libcxx decides to almost all configuration macros to be defined. So before it tested whether a macro was defined/undefined, and now it assumes it is defined and tests whether its value is 1/0. Before llvm/llvm-project#112094 `_config_site.in` used to use `#cmakedefine`, which only defined variables when they were enabled, but now it uses `#cmakedefine01`, which always defines variables and assigns 1 or 0 depending on whether the feature is enabled. So this change adds `#define` to each variable that `_config_site.in` has an entry of. The value assigned is 1 if it was defined in our previous Emscripten environment and 0 if not. - Fix Emscripten's locale: 2ae01b0 Before, the code was like https://github.com/emscripten-core/emscripten/blob/dc1abd514b1bade135a01a4453a9ff6def0793b6/system/lib/libcxx/include/__locale_dir/locale_base_api.h#L12-L30 But now they are divided into two parts, one using the new API and the other using old. See "Locale API reimplementation" above. https://github.com/llvm/llvm-project/blob/ec28b8f9cc7f2ac187d8a617a6d08d5e56f9120e/libcxx/include/__locale_dir/locale_base_api.h#L116-L138 This adds Emscripten in the beginning of the "old" API list. (This has to be the beginning; see #23414) - Import libc headers used by libcxx: 12a4ee4, 12a4ee4 and 43c8ce4 This imports a part of libc headers into `system/lib/llvm-libc`. The imported directories are: - `libc/shared` - `libc/src/__support` - `libc/include/llvm-libc-macros` - `libc/include/llvm-libc-types` - `libc/hdr` See "sharing of headers between libc+ and libc" above for details. This also applies llvm/llvm-project#133999, which is a bugfix that has not be backported, which fixes the bug of including from a wrong directory. - `std::uncaught_exception` -> `std::uncaught_exceptions`: 1bf4e78 `std::uncaught_exception` has been deprecated in C++17, so it generates a warning (which we treat as an error). Replaced it with `std::uncaught_exceptions`, which returns the number of uncaught exceptions (but can still be used as a boolean in the test). - Remove `ryu_constants.h` and `ryu_long_double_constants.h` from libc: 5767ac4 These are not used from libcxx and `ryu_long_double_constants.h` is huge (12M).
This patch updates the includes guards of the C++ 03 headers.
This is part of https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc.