This is an archive of the discontinued LLVM Phabricator instance.

[libc][NFC] move strcoll to strcmp template
Needs ReviewPublic

Authored by michaelrj on Mar 22 2023, 2:12 PM.

Details

Summary

While locales are not implemented, strcoll is equivalent to strcmp. This
patch moves strcoll over to the strcmp internal implementation.

Diff Detail

Event Timeline

michaelrj created this revision.Mar 22 2023, 2:12 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 22 2023, 2:12 PM
michaelrj requested review of this revision.Mar 22 2023, 2:12 PM

Is there a reason not to just call __llvm_libc::strcmp ?
The two will likely get collapsed by --icf=all anyway, but making it just a tail call to start with seems ideal.

Currently we're avoiding calling functions by their public name inside of other implementations when possible to keep each entrypoint independent.