Details
- Reviewers
ldionne Mordante var-const - Group Reviewers
Restricted Project - Commits
- rG2aea8af25136: [libc++] Make _LIBCPP_DEBUG_RANDOMIZE_RANGE a function
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM once the CI passes. I think it would be good for @ldionne to also have a look so I leave the final approval to him.
libcxx/include/__debug | ||
---|---|---|
30–31 | Not your change, but I'm not really fond of this structure, where:
Is there a reason why we can't move this code below the second set of includes and thus not have a small namespace std section? |
I like this! I've been meaning to do this but didn't get around to it. I have some comments though.
libcxx/include/__debug | ||
---|---|---|
16 | We'll need to include __algorithm/shuffle.h. For that reason, I think we need to pull this into another header (to avoid a bunch of headers suddenly including std::shuffle). | |
33–39 | For unused params warning. |
libcxx/include/__libcxx/debug_randomize_range.h | ||
---|---|---|
22 ↗ | (On Diff #439215) | Also HIDE_FROM_ABI? |
LGTM once CI is green and all comments have been applied.
libcxx/include/CMakeLists.txt | ||
---|---|---|
329 | Let's call this __debug_utils/randomize_range.h for now, and eventually we can actually rename it to __debug/randomize_range.h, and rename the current __debug header to something else. WDYT? __libcxx/ definitely looks out of place. | |
libcxx/include/__algorithm/partial_sort.h | ||
22–23 | This can be removed (here and in the other headers). | |
libcxx/include/__libcxx/debug_randomize_range.h | ||
12 ↗ | (On Diff #439215) | Maybe guard this include with #ifdef _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY? |
It looks like the ARM runners are currently broken and I've got a bad clang trunk. I'm landing this, but I'll keep an eye on the bootstrapping build.
Let's call this __debug_utils/randomize_range.h for now, and eventually we can actually rename it to __debug/randomize_range.h, and rename the current __debug header to something else. WDYT? __libcxx/ definitely looks out of place.