[libc++] Move everything related solely to _LIBCPP_ASSERT to its own file
This is the first step towards disentangling the debug mode and assertions
in libc++. This patch doesn't make any functional change: it simply moves
_LIBCPP_ASSERT-related stuff to its own file so as to make it clear that
libc++ assertions and the debug mode are different things. Future patches
will make it possible to enable assertions without enabling the debug
mode.
Differential Revision: https://reviews.llvm.org/D119769
NOKEYCHECK=True
GitOrigin-RevId: f87aa19be64499308fc18f92d048c5fa2d3064d9
diff --git a/include/__string b/include/__string
index 60a67d4..26aa619 100644
--- a/include/__string
+++ b/include/__string
@@ -17,7 +17,9 @@
#include <__algorithm/find_end.h>
#include <__algorithm/find_first_of.h>
#include <__algorithm/min.h>
+#include <__assert>
#include <__config>
+#include <__debug>
#include <__functional/hash.h> // for __murmur2_or_cityhash
#include <__iterator/iterator_traits.h>
#include <cstdint> // for uint_least16_t
@@ -30,8 +32,6 @@
# include <cwchar> // for wmemcpy
#endif
-#include <__debug>
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif