This is an archive of the discontinued LLVM Phabricator instance.

[libc] Templatize str{,n}cmp
ClosedPublic

Authored by abrachet on Jan 8 2023, 1:47 PM.

Details

Summary

This will be used to implement the case insensitive str{,n}casecmp

Diff Detail

Event Timeline

abrachet created this revision.Jan 8 2023, 1:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 8 2023, 1:47 PM
abrachet requested review of this revision.Jan 8 2023, 1:47 PM
sivachandra accepted this revision.Jan 8 2023, 9:53 PM
This revision is now accepted and ready to land.Jan 8 2023, 9:53 PM
lntue added inline comments.Jan 9 2023, 6:54 AM
libc/src/string/memory_utils/strcmp_implementations.h
21

Will there be a problem with signed-ness difference between char and unsigned char in lines 20 vs 22?

This revision was automatically updated to reflect the committed changes.
abrachet marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptJan 9 2023, 12:13 PM
abrachet added inline comments.Jan 9 2023, 12:13 PM
libc/src/string/memory_utils/strcmp_implementations.h
21

I don't really know, this is just how it was before and I copied verbatim other than using the comparator function