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)
This commit is contained in:
Jonas Devlieghere
2019-07-18 16:28:15 -07:00
parent 986a036685
commit 5c5041235b
10 changed files with 31 additions and 27 deletions

View File

@@ -950,7 +950,6 @@ ASTUnitRef ASTProducer::createASTUnit(
if (fileSystem != llvm::vfs::getRealFileSystem()) {
CompIns.getSourceMgr().setFileSystem(fileSystem);
Invocation.getClangImporterOptions().ForceUseSwiftVirtualFileSystem = true;
}
if (CompIns.setup(Invocation)) {