Skip to content

Commit 65813f2

Browse files
committed
Fix ClangImporter
1 parent 5884af5 commit 65813f2

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,22 +1055,12 @@ ClangImporter::create(ASTContext &ctx, const ClangImporterOptions &importerOpts,
10551055
overlayFileSystem->pushOverlay(importerOpts.InMemoryOutputFileSystem);
10561056
clangFileSystem = overlayFileSystem;
10571057
}
1058-
if (!ctx.SearchPathOpts.VFSOverlayFiles.empty() ||
1059-
importerOpts.ForceUseSwiftVirtualFileSystem ||
1060-
importerOpts.InMemoryOutputFileSystem) {
1061-
// If the clang instance has overlays it means the user has provided
1062-
// -ivfsoverlay options. We're going to clobber their file system with
1063-
// the Swift file system, so warn about it.
1064-
if (!instance.getHeaderSearchOpts().VFSOverlayFiles.empty()) {
1065-
ctx.Diags.diagnose(SourceLoc(), diag::clang_vfs_overlay_is_ignored);
1066-
}
1067-
// SWIFT_ENABLE_TENSORFLOW
1068-
instance.setVirtualFileSystem(clangFileSystem);
1069-
}
1058+
// TODO(asuhan): Check this, CompilerInstance::setVirtualFileSystem removed in
1059+
// https://github.com/apple/swift-clang/commit/5f92395a7e64526f6f94f31a9d143f81a69e9209.
10701060
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS =
10711061
clang::createVFSFromCompilerInvocation(instance.getInvocation(),
10721062
instance.getDiagnostics(),
1073-
ctx.SourceMgr.getFileSystem());
1063+
clangFileSystem);
10741064
instance.createFileManager(std::move(VFS));
10751065
}
10761066

0 commit comments

Comments
 (0)