This patch removes _WrapAlgPolicy and related functionality. Instead, we explicitly forward to __sort now if we have an instantiation inside the dylib. If we don't we just call __introsort.
Details
- Reviewers
ldionne Mordante var-const jdoerfert - Group Reviewers
Restricted Project - Commits
- rGdc017e03ca55: [libc++] Forward ranges::sort to instantiations in the dylib
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I generally like this change, but I think we want to clean up the situation with __sort5 and friends before we do it.
libcxx/src/algorithm.cpp | ||
---|---|---|
14–27 | Basically, don't rely on the (way too subtle) trick where you're avoiding deadly recursion because you're passing the third template argument to __sort. | |
46–47 | I don't think these symbols could actually be called previously, because they are only used from __sort, which is in the dylib as well. I would actually start with that patch since it'll simplify the rest of this patch. I would not ship this in LLVM 16 though, to give us a bit of time to find potential issues with it. |