[libc++][NFC] Move some functions from directory_iterator.cpp to filesystem_common.h
authorLouis Dionne <ldionne.2@gmail.com>
Wed, 26 Jan 2022 16:05:47 +0000 (11:05 -0500)
committerLouis Dionne <ldionne.2@gmail.com>
Thu, 27 Jan 2022 15:58:27 +0000 (10:58 -0500)
commit89f03804fae720f4c4b717ca555f5d897d9b4900
tree50f8d25cd0e77d51a96869ce197107d961e38425
parentd27cbfa9d366c2f6620770f514f612aa1bb0ecb6
[libc++][NFC] Move some functions from directory_iterator.cpp to filesystem_common.h

This move is going to be needed in order to reuse `posix_readdir` in
another translation unit. This doesn't change any of the code except
for removing an unused function parameter that otherwise triggers a
warning inside our tests.

Differential Revision: https://reviews.llvm.org/D118254
libcxx/src/filesystem/directory_iterator.cpp
libcxx/src/filesystem/filesystem_common.h