Commit Graph

6 Commits

Author SHA1 Message Date
Jonas Devlieghere
5c5041235b Merge Swift & Clang VFS in the ClangImporter
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)
2019-08-19 16:53:03 -07:00
Saleem Abdulrasool
c683b4985a test: make Frontend.vfs pass on Windows
Ensure that we convert the path to the correct separator for the mapping
to take effect.  This makes the last Frontend test pass on Windows.
2019-04-07 16:32:15 -07:00
Saleem Abdulrasool
86e600dc8e test: adjust Frontend tests for Windows
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.
2019-01-26 11:08:55 -08:00
Jordan Rose
115a6644e9 Add a test that serialized diagnostics respect VFS filenames too 2018-08-28 11:39:43 -07:00
Robert Widmann
61203921f5 Diagnose clobbering clang's VFS with our own
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.
2018-07-31 15:11:52 -07:00
Robert Widmann
0e58b7fd14 Plumbing for a Virtual File System
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.
2018-07-31 13:16:14 -07:00