[VFS] Handle empty entries in directory traversal
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Wed, 30 Mar 2016 23:54:00 +0000 (23:54 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Wed, 30 Mar 2016 23:54:00 +0000 (23:54 +0000)
commitd712b34167624ce3ca2f96dcef8d5cd5115d0ae9
treede3f6fd90c8107bcc0ec0dc98328a80cdbfc0169
parent19b648eae3bb85e30d08665305fb506cbff7626a
[VFS] Handle empty entries in directory traversal

The VFS YAML files contain empty directory entries to describe that it's
returning from a subdirectory before describing new files in the parent.
In the future, we should properly sort and write YAML files avoiding
such empty dirs and mitigate the extra recurson cost. However, since
this is used by previous existing YAMLs, make the traversal work in
their presence.

rdar://problem/24499339

llvm-svn: 264970
clang/lib/Basic/VirtualFileSystem.cpp
clang/test/Modules/Inputs/crash-recovery/usr/include/module.map
clang/test/Modules/Inputs/crash-recovery/usr/include/pthread.h [new file with mode: 0644]
clang/test/Modules/Inputs/crash-recovery/usr/include/pthread/pthread_impl.h [new file with mode: 0644]
clang/test/Modules/Inputs/crash-recovery/usr/include/pthread_impl.h [new file with mode: 0644]
clang/test/Modules/crash-vfs-path-emptydir-entries.m [new file with mode: 0644]