Recommit "Use possibly cached directory entry values when performing recursive directory iteration."

The initial patch didn't correctly handle systems when the dirent struct
didn't provide the d_type member. Specifically it set the cache to the incorrect state,
and claimed it was partially populated.

The updated version of this change correctly handles setting up the
cache when the file type is not known (aka file_type::none).

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337765 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed