summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2016-05-16 16:46:01 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2016-05-16 16:46:01 +0000
commitb171a59bfd152346ca068c73ccb61fe28643d024 (patch)
treefed5cea8a881988c786113364d0e70e4b86f6e99 /clang/test
parentf3c7a3523857a4b8d6aa50bcc14e4a379d6388c7 (diff)
downloadbcm5719-llvm-b171a59bfd152346ca068c73ccb61fe28643d024.tar.gz
bcm5719-llvm-b171a59bfd152346ca068c73ccb61fe28643d024.zip
[Modules] Use vfs for (recursive) directory iteration
Clang performs directory walk while searching headers inside modules by using the ::sys::fs instead of ::vfs. This prevents any code that uses the VFS (e.g, reproducer scripts) to actually find such headers, since the VFS will never be searched for those. Change these places to use vfs::recursive_directory_iterator and vfs::directory_iterator instead. Differential Revision: http://reviews.llvm.org/D20266 rdar://problem/25880368 llvm-svn: 269661
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Modules/crash-vfs-umbrella-frameworks.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Modules/crash-vfs-umbrella-frameworks.m b/clang/test/Modules/crash-vfs-umbrella-frameworks.m
index 0454976b170..0c3981ddaa8 100644
--- a/clang/test/Modules/crash-vfs-umbrella-frameworks.m
+++ b/clang/test/Modules/crash-vfs-umbrella-frameworks.m
@@ -40,3 +40,16 @@
// CHECKYAML-NEXT: 'external-contents': "/[[PATH]]/i/Frameworks/B.framework/Headers/B.h"
@import I;
+
+// Run the reproducer script - regular exit code is enough to test it works. The
+// intent here is to guarantee that the collect umbrella headers into the VFS
+// can be used, testing that vfs::recursive_directory_iterator is used correctly
+// Make sure to erase the include paths used to build the modules to guarantee
+// that the VFS overlay won't fallback to use it. Also wipe out the module cache
+// to force header search.
+//
+// RUN: cd %t
+// RUN: rm -rf i
+// RUN: rm -rf crash-vfs-umbrella-*.cache/modules/*
+// RUN: chmod 755 crash-vfs-*.sh
+// RUN: ./crash-vfs-*.sh
OpenPOWER on IntegriCloud