Index: lib/Frontend/CompilerInstance.cpp =================================================================== --- lib/Frontend/CompilerInstance.cpp +++ lib/Frontend/CompilerInstance.cpp @@ -302,8 +302,8 @@ void CompilerInstance::createFileManager() { if (!hasVirtualFileSystem()) { - // TODO: choose the virtual file system based on the CompilerInvocation. - setVirtualFileSystem(vfs::getRealFileSystem()); + setVirtualFileSystem( + createVFSFromCompilerInvocation(getInvocation(), getDiagnostics())); } FileMgr = new FileManager(getFileSystemOpts(), VirtualFileSystem); }