FileSpec::EnumerateDirectory has a bunch of platform-specific gunk in it for posix and non-posix platforms. We can get rid of all this by using LLVM's easy-to-use directory iterators.
Ideally I would like to just remove this entire EnumerateDirectory function. It served a useful purpose when the code for iterating directories would have to be re-invented every single time otherwise, but since we have these nice iterators, this intermediate enumerator function actually makes the code more verbose, since we have to set up this baton and return these magic values from the callback function, when usually this just means "be recursive" or "don't be recursive", something the writer of the algorithm could more cleanly express by simply choosing recursive_directory_iterator or directory_iterator. Anyway, I'm getting ahead of myself. For now just clean up this function and leave everything else as-is.