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.
ldionne Mordante var-const jdoerfert
- Group Reviewers
- rGdc017e03ca55: [libc++] Forward ranges::sort to instantiations in the dylib
I generally like this change, but I think we want to clean up the situation with __sort5 and friends before we do it.
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.
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.