diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt --- a/libcxx/include/CMakeLists.txt +++ b/libcxx/include/CMakeLists.txt @@ -456,7 +456,6 @@ execution experimental/__config experimental/__memory - experimental/algorithm experimental/coroutine experimental/deque experimental/forward_list diff --git a/libcxx/include/experimental/algorithm b/libcxx/include/experimental/algorithm deleted file mode 100644 --- a/libcxx/include/experimental/algorithm +++ /dev/null @@ -1,52 +0,0 @@ -// -*- C++ -*- -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef _LIBCPP_EXPERIMENTAL_ALGORITHM -#define _LIBCPP_EXPERIMENTAL_ALGORITHM - -/* - experimental/algorithm synopsis - -#include - -namespace std { -namespace experimental { -inline namespace fundamentals_v1 { - -template -ForwardIterator search(ForwardIterator first, ForwardIterator last, - const Searcher &searcher); - -// sample removed because it's now part of C++17 - -} // namespace fundamentals_v1 -} // namespace experimental -} // namespace std - -*/ - -#include <__debug> -#include -#include -#include - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -_LIBCPP_BEGIN_NAMESPACE_LFTS - -template -_LIBCPP_INLINE_VISIBILITY -_ForwardIterator search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher &__s) -{ return __s(__f, __l).first; } - -_LIBCPP_END_NAMESPACE_LFTS - -#endif /* _LIBCPP_EXPERIMENTAL_ALGORITHM */ diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap --- a/libcxx/include/module.modulemap +++ b/libcxx/include/module.modulemap @@ -1016,10 +1016,6 @@ module experimental { requires cplusplus11 - module algorithm { - header "experimental/algorithm" - export * - } module coroutine { requires coroutines header "experimental/coroutine" diff --git a/libcxx/test/libcxx/clang_tidy.sh.cpp b/libcxx/test/libcxx/clang_tidy.sh.cpp --- a/libcxx/test/libcxx/clang_tidy.sh.cpp +++ b/libcxx/test/libcxx/clang_tidy.sh.cpp @@ -204,7 +204,6 @@ // experimental headers #if __cplusplus >= 201103L -# include # ifndef _LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES # include # endif diff --git a/libcxx/test/libcxx/double_include.sh.cpp b/libcxx/test/libcxx/double_include.sh.cpp --- a/libcxx/test/libcxx/double_include.sh.cpp +++ b/libcxx/test/libcxx/double_include.sh.cpp @@ -205,7 +205,6 @@ // experimental headers #if __cplusplus >= 201103L -# include # ifndef _LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES # include # endif diff --git a/libcxx/test/libcxx/experimental/algorithms/header.algorithm.synop/includes.pass.cpp b/libcxx/test/libcxx/experimental/algorithms/header.algorithm.synop/includes.pass.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/algorithms/header.algorithm.synop/includes.pass.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -// - -#include - -#include "test_macros.h" - -#ifndef _LIBCPP_ALGORITHM -# error " must include " -#endif - -int main(int, char**) -{ - - return 0; -} diff --git a/libcxx/test/libcxx/experimental/algorithms/version.pass.cpp b/libcxx/test/libcxx/experimental/algorithms/version.pass.cpp deleted file mode 100644 --- a/libcxx/test/libcxx/experimental/algorithms/version.pass.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -// - -#include - -#include "test_macros.h" - -#ifndef _LIBCPP_VERSION -# error _LIBCPP_VERSION not defined -#endif - -int main(int, char**) -{ - - return 0; -} diff --git a/libcxx/test/libcxx/min_max_macros.compile.pass.cpp b/libcxx/test/libcxx/min_max_macros.compile.pass.cpp --- a/libcxx/test/libcxx/min_max_macros.compile.pass.cpp +++ b/libcxx/test/libcxx/min_max_macros.compile.pass.cpp @@ -321,8 +321,6 @@ // experimental headers #if __cplusplus >= 201103L -# include -TEST_MACROS(); # ifndef _LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES # include TEST_MACROS(); diff --git a/libcxx/test/libcxx/nasty_macros.compile.pass.cpp b/libcxx/test/libcxx/nasty_macros.compile.pass.cpp --- a/libcxx/test/libcxx/nasty_macros.compile.pass.cpp +++ b/libcxx/test/libcxx/nasty_macros.compile.pass.cpp @@ -315,7 +315,6 @@ // experimental headers #if __cplusplus >= 201103L -# include # ifndef _LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES # include # endif diff --git a/libcxx/test/libcxx/no_assert_include.compile.pass.cpp b/libcxx/test/libcxx/no_assert_include.compile.pass.cpp --- a/libcxx/test/libcxx/no_assert_include.compile.pass.cpp +++ b/libcxx/test/libcxx/no_assert_include.compile.pass.cpp @@ -200,7 +200,6 @@ // experimental headers #if __cplusplus >= 201103L -# include # ifndef _LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES # include # endif diff --git a/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp b/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp deleted file mode 100644 --- a/libcxx/test/std/experimental/algorithms/alg.search/search.pass.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++03, c++11 - -// - -// template -// ForwardIterator search(ForwardIterator first, ForwardIterator last, -// const Searcher& searcher); -// -// returns searcher.operator(first, last).first -// - -#include -#include - -#include "test_macros.h" -#include "test_iterators.h" - -int searcher_called = 0; - -struct MySearcher { - template - std::pair - operator() (Iterator b, Iterator e) const - { - ++searcher_called; - return std::make_pair(b, e); - } -}; - - -int main(int, char**) { - typedef int * RI; - static_assert((std::is_same::value), "" ); - - RI it(nullptr); - assert(it == std::experimental::search(it, it, MySearcher())); - assert(searcher_called == 1); - - return 0; -} diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp @@ -31,7 +31,7 @@ // }; -#include +#include #include #include @@ -41,7 +41,7 @@ template void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result) { std::experimental::boyer_moore_searcher s{b2, e2}; - assert(result == std::experimental::search(b1, e1, s)); + assert(result == std::search(b1, e1, s)); } template diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp @@ -31,7 +31,7 @@ // }; -#include +#include #include #include @@ -47,7 +47,7 @@ std::experimental::boyer_moore_searcher::value_type>::type>> s{b2, e2}; - assert(result == std::experimental::search(b1, e1, s)); + assert(result == std::search(b1, e1, s)); } template diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp @@ -31,7 +31,7 @@ // }; -#include +#include #include #include @@ -59,7 +59,7 @@ count_equal> s{b2, e2}; count_equal::count = 0; - assert(result == std::experimental::search(b1, e1, s)); + assert(result == std::search(b1, e1, s)); assert(count_equal::count <= max_count); } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp @@ -31,7 +31,7 @@ // }; -#include +#include #include #include @@ -53,7 +53,7 @@ std::experimental::boyer_moore_searcher::value_type>::type>, count_equal> s{b2, e2}; count_equal::count = 0; - assert(result == std::experimental::search(b1, e1, s)); + assert(result == std::search(b1, e1, s)); assert(count_equal::count <= max_count); } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp @@ -31,7 +31,7 @@ // }; -#include +#include #include #include @@ -41,7 +41,7 @@ template void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result) { std::experimental::boyer_moore_horspool_searcher s{b2, e2}; - assert(result == std::experimental::search(b1, e1, s)); + assert(result == std::search(b1, e1, s)); } template diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp @@ -30,7 +30,7 @@ // BinaryPredicate pred_; // exposition only // }; -#include +#include #include #include @@ -46,7 +46,7 @@ std::experimental::boyer_moore_horspool_searcher::value_type>::type>> s{b2, e2}; - assert(result == std::experimental::search(b1, e1, s)); + assert(result == std::search(b1, e1, s)); } template diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp @@ -30,7 +30,7 @@ // BinaryPredicate pred_; // exposition only // }; -#include +#include #include #include @@ -58,7 +58,7 @@ count_equal> s{b2, e2}; count_equal::count = 0; - assert(result == std::experimental::search(b1, e1, s)); + assert(result == std::search(b1, e1, s)); assert(count_equal::count <= max_count); } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp @@ -30,7 +30,7 @@ // BinaryPredicate pred_; // exposition only // }; -#include +#include #include #include @@ -52,7 +52,7 @@ std::experimental::boyer_moore_horspool_searcher::value_type>::type>, count_equal> s{b2, e2}; count_equal::count = 0; - assert(result == std::experimental::search(b1, e1, s)); + assert(result == std::search(b1, e1, s)); assert(count_equal::count <= max_count); } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp @@ -31,7 +31,7 @@ // }; -#include +#include #include #include @@ -40,8 +40,8 @@ template void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result) { - std::experimental::default_searcher s{b2, e2}; - assert(result == std::experimental::search(b1, e1, s)); + std::default_searcher s{b2, e2}; + assert(result == std::search(b1, e1, s)); } template diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp @@ -31,7 +31,7 @@ // }; -#include +#include #include #include @@ -50,9 +50,9 @@ template void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned max_count) { - std::experimental::default_searcher s{b2, e2}; + std::default_searcher s{b2, e2}; count_equal::count = 0; - assert(result == std::experimental::search(b1, e1, s)); + assert(result == std::search(b1, e1, s)); assert(count_equal::count <= max_count); } diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pass.cpp --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pass.cpp @@ -16,7 +16,7 @@ // BinaryPredicate pred = BinaryPredicate()); -#include +#include #include #include @@ -25,8 +25,7 @@ template void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result) { - assert(result == std::experimental::search(b1, e1, - std::experimental::make_default_searcher(b2, e2))); + assert(result == std::search(b1, e1, std::default_searcher(b2, e2))); } template diff --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pred.pass.cpp --- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pred.pass.cpp +++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pred.pass.cpp @@ -15,8 +15,7 @@ // make_default_searcher(ForwardIterator pat_first, ForwardIterator pat_last, // BinaryPredicate pred = BinaryPredicate()); - -#include +#include #include #include @@ -36,8 +35,7 @@ template void do_search(Iter1 b1, Iter1 e1, Iter2 b2, Iter2 e2, Iter1 result, unsigned max_count) { count_equal::count = 0; - assert(result == std::experimental::search(b1, e1, - std::experimental::make_default_searcher(b2, e2))); + assert(result == std::search(b1, e1, std::default_searcher(b2, e2))); assert(count_equal::count <= max_count); } diff --git a/llvm/utils/gn/secondary/libcxx/include/BUILD.gn b/llvm/utils/gn/secondary/libcxx/include/BUILD.gn --- a/llvm/utils/gn/secondary/libcxx/include/BUILD.gn +++ b/llvm/utils/gn/secondary/libcxx/include/BUILD.gn @@ -511,7 +511,6 @@ "execution", "experimental/__config", "experimental/__memory", - "experimental/algorithm", "experimental/coroutine", "experimental/deque", "experimental/forward_list",