The clang importer has to deal with two virtual file systems, one coming
from clang, and one coming from swift. Currently, if both are set, we
emit a diagnostic that we'll pick the swift one.
This commit changes that, by merging the two virtual file systems. The
motivation for this change is the reproducer infrastructure in LLDB,
which adds a third virtual file system to the mix.
(cherry picked from commit 94ef5431ff)
Adjust some of the tests to improve the pass rate on Windows. This
involves using less shell syntax, quoting instead of escaping slashes
and accepting the windows path separator.
There are three modes of concern here:
1) User provides -vfsoverlay but not -Xcc -ivfsoverlay
Recommended behavior.
2) User provides -Xcc -ivfsoverlay but not -vfsoverlay
Legacy behavior. Clang will handle setup for the VFS.
3) User provides both -vfsoverlay and -Xcc -ivfsoverlay
Unsupported. We will ignore the clang VFS overlays and substitute our
own. We will also pop a warning about this.
Adds the -vfsoverlay frontend option that enables the user to pass
VFS overlay YAML files to Swift. These files define a (potentially
many-layered) virtual mapping on which we predicate a VFS.
Switch all input-based memory buffer reads in the Frontend to the new
FileSystem-based approach.