[libcxx-commits] [PATCH] D105712: [libc++] Fix libc++ in C++03 mode on Clang ToT

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jul 9 10:08:29 PDT 2021


ldionne updated this revision to Diff 357555.
ldionne added a comment.

Fix more instances


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105712/new/

https://reviews.llvm.org/D105712

Files:
  libcxx/include/__hash_table
  libcxx/include/__tree
  libcxx/utils/ci/run-buildbot


Index: libcxx/utils/ci/run-buildbot
===================================================================
--- libcxx/utils/ci/run-buildbot
+++ 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"
Index: libcxx/include/__tree
===================================================================
--- libcxx/include/__tree
+++ 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
 }
 
 
Index: libcxx/include/__hash_table
===================================================================
--- libcxx/include/__hash_table
+++ 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 <class _Tp, class _Hash, class _Equal, class _Alloc>
@@ -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 <class _Tp, class _Hash, class _Equal, class _Alloc>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105712.357555.patch
Type: text/x-patch
Size: 1968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210709/59ea5447/attachment.bin>


More information about the libcxx-commits mailing list