This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add an implementation of qsort.
ClosedPublic

Authored by sivachandra on Sep 23 2021, 10:48 PM.

Details

Summary

A fuzzer for qsort has also been added.

Diff Detail

Event Timeline

sivachandra created this revision.Sep 23 2021, 10:48 PM
sivachandra requested review of this revision.Sep 23 2021, 10:48 PM

Add couple of more tests.

lkail added a subscriber: lkail.Sep 23 2021, 11:07 PM
michaelrj accepted this revision.Sep 24 2021, 10:11 AM

LGTM, approved with nit

libc/src/stdlib/qsort.cpp
18

I think you should put this class as well as the internal quicksort function in the internal namespace.

This revision is now accepted and ready to land.Sep 24 2021, 10:11 AM

Move internal pieces into an internal namespace.

sivachandra marked an inline comment as done.Sep 24 2021, 12:18 PM
This revision was landed with ongoing or failed builds.Sep 24 2021, 12:23 PM
This revision was automatically updated to reflect the committed changes.