[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 09:46:57 PDT 2021


ldionne created this revision.
Herald added a subscriber: arichardson.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

This is an attempt to fix libc++ in C++03 mode after http://llvm.org/D104500,
which removed implicit move as an extension in C++03.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105712

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


Index: libcxx/utils/ci/run-buildbot
===================================================================
--- libcxx/utils/ci/run-buildbot
+++ libcxx/utils/ci/run-buildbot
@@ -180,9 +180,6 @@
     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
     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/__hash_table
===================================================================
--- libcxx/include/__hash_table
+++ libcxx/include/__hash_table
@@ -2476,7 +2476,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.357548.patch
Type: text/x-patch
Size: 1094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210709/540233a9/attachment-0001.bin>


More information about the libcxx-commits mailing list