summaryrefslogtreecommitdiffstats
path: root/clang/include/clang/Frontend/CompilerInstance.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include/clang/Frontend/CompilerInstance.h')
-rw-r--r--clang/include/clang/Frontend/CompilerInstance.h20
1 files changed, 3 insertions, 17 deletions
diff --git a/clang/include/clang/Frontend/CompilerInstance.h b/clang/include/clang/Frontend/CompilerInstance.h
index 2fc61574e30..f63ff48f69a 100644
--- a/clang/include/clang/Frontend/CompilerInstance.h
+++ b/clang/include/clang/Frontend/CompilerInstance.h
@@ -82,9 +82,6 @@ class CompilerInstance : public ModuleLoader {
/// Auxiliary Target info.
IntrusiveRefCntPtr<TargetInfo> AuxTarget;
- /// The virtual file system.
- IntrusiveRefCntPtr<llvm::vfs::FileSystem> VirtualFileSystem;
-
/// The file manager.
IntrusiveRefCntPtr<FileManager> FileMgr;
@@ -382,20 +379,8 @@ public:
/// @name Virtual File System
/// {
- bool hasVirtualFileSystem() const { return VirtualFileSystem != nullptr; }
-
llvm::vfs::FileSystem &getVirtualFileSystem() const {
- assert(hasVirtualFileSystem() &&
- "Compiler instance has no virtual file system");
- return *VirtualFileSystem;
- }
-
- /// Replace the current virtual file system.
- ///
- /// \note Most clients should use setFileManager, which will implicitly reset
- /// the virtual file system to the one contained in the file manager.
- void setVirtualFileSystem(IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS) {
- VirtualFileSystem = std::move(FS);
+ return *getFileManager().getVirtualFileSystem();
}
/// }
@@ -645,7 +630,8 @@ public:
/// Create the file manager and replace any existing one with it.
///
/// \return The new file manager on success, or null on failure.
- FileManager *createFileManager();
+ FileManager *
+ createFileManager(IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS = nullptr);
/// Create the source manager and replace any existing one with it.
void createSourceManager(FileManager &FileMgr);
OpenPOWER on IntegriCloud