[libcxx-commits] [PATCH] D92190: [libc++] fix std::sort(T**, T**)
Alexander Richardson via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Nov 26 09:57:14 PST 2020
arichardson added a comment.
This is required for CHERI, where we use 128-bit pointers (well actually 129 bits, since we also have a hidden validity bit).
For us size_t/ptrdiff_t are still 64 bits, but uintptr_t is 128-bits, so we need to do this sort using uintptr_t.
I'm not sure if any other architectures are affected by this x32, but it's required for us and getting this change upstreamed would be rather helpful.
================
Comment at: libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp:138-144
+ int array_size = 10;
+ int v[array_size];
+ int *pv[array_size];
+ for (int i = 0; i < array_size; i++) {
+ v[i] = i;
+ pv[i] = &v[array_size - 1 - i];
+ }
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92190/new/
https://reviews.llvm.org/D92190
More information about the libcxx-commits
mailing list