[PATCH] D93233: [libc++] Replaces std::sort by Bitset sorting algorithm.

Nilay Vaish via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 11:34:53 PDT 2021


nilayvaish added inline comments.


================
Comment at: libcxx/src/legacy-sort.cpp:339-393
+template _LIBCPP_FUNC_VIS void __sort<__less<char>&, char*>(char*, char*, __less<char>&);
+template _LIBCPP_FUNC_VIS void __sort<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
+template _LIBCPP_FUNC_VIS void __sort<__less<signed char>&, signed char*>(signed char*, signed char*,
+                                                                          __less<signed char>&);
+template _LIBCPP_FUNC_VIS void __sort<__less<unsigned char>&, unsigned char*>(unsigned char*, unsigned char*,
+                                                                              __less<unsigned char>&);
+template _LIBCPP_FUNC_VIS void __sort<__less<short>&, short*>(short*, short*, __less<short>&);
----------------
ldionne@, I am wondering if these symbols need to be in this file.  Can we continue with the setup from before i.e. these symbols have extern declarations in sort.h and are defined in algorithm.cpp?  Further is there a need for retaining the existing sorting algorithm?  It seems to me we need to retain __insertion_sort_incomplete only.  What do you think?


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

https://reviews.llvm.org/D93233



More information about the llvm-commits mailing list