diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -2457,7 +2457,11 @@ __h.get_deleter().__value_constructed = true; __h->__hash_ = hash_function()(__h->__value_); __h->__next_ = nullptr; +#if defined(_LIBCPP_CXX03_LANG) + return _VSTD::move(__h); +#else return __h; +#endif } template @@ -2476,7 +2480,11 @@ __h.get_deleter().__value_constructed = true; __h->__hash_ = __hash; __h->__next_ = nullptr; +#if defined(_LIBCPP_CXX03_LANG) + return _VSTD::move(__h); +#else return __h; +#endif } template diff --git a/libcxx/include/__tree b/libcxx/include/__tree --- a/libcxx/include/__tree +++ b/libcxx/include/__tree @@ -2135,7 +2135,11 @@ __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na)); __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), _VSTD::forward<_Args>(__args)...); __h.get_deleter().__value_constructed = true; +#if defined(_LIBCPP_CXX03_LANG) + return _VSTD::move(__h); +#else return __h; +#endif } diff --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map --- a/libcxx/include/ext/hash_map +++ b/libcxx/include/ext/hash_map @@ -671,7 +671,11 @@ __h.get_deleter().__first_constructed = true; __node_traits::construct(__na, _VSTD::addressof(__h->__value_.second)); __h.get_deleter().__second_constructed = true; +#if defined(_LIBCPP_CXX03_LANG) + return _VSTD::move(__h); +#else return __h; +#endif } template diff --git a/libcxx/include/map b/libcxx/include/map --- a/libcxx/include/map +++ b/libcxx/include/map @@ -1575,7 +1575,11 @@ __h.get_deleter().__first_constructed = true; __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__get_value().second)); __h.get_deleter().__second_constructed = true; +#if defined(_LIBCPP_CXX03_LANG) + return _VSTD::move(__h); +#else return __h; +#endif } template diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -1765,7 +1765,11 @@ __h.get_deleter().__first_constructed = true; __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__get_value().second)); __h.get_deleter().__second_constructed = true; +#if defined(_LIBCPP_CXX03_LANG) + return _VSTD::move(__h); +#else return __h; +#endif } template diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils/ci/run-buildbot @@ -180,9 +180,8 @@ python3 libcxx/utils/graph_header_deps.py >/dev/null ;; generic-cxx03) - # TODO: Switch to compiling with Clang ToT once issues with https://reviews.llvm.org/D104500 are resolved. - export CC=clang-12 - export CXX=clang++-12 + export CC=clang-tot + export CXX=clang++-tot clean generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx03.cmake" \ -DLIBCXX_TEST_CONFIG="${MONOREPO_ROOT}/libcxx/test/configs/libcxx-trunk-shared.cfg.in"