diff options
| author | Jan Svoboda <jan_svoboda@apple.com> | 2025-10-22 10:15:12 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-22 10:15:12 -0700 |
| commit | 866879f80342b857a8b911c804189c43ac4fc334 (patch) | |
| tree | 610927898a88557e2ad83e8080e80175ecd7c35a /clang/lib/Frontend/CompilerInstance.cpp | |
| parent | 47ea8543e26a823a0543bbdf2ff529ec432c09e2 (diff) | |
[clang] Don't silently inherit the VFS from `FileManager` (#164323)
Since https://github.com/llvm/llvm-project/pull/158381 the
`CompilerInstance` is aware of the VFS and co-owns it. To reduce scope
of that PR, the VFS was being inherited from the `FileManager` during
`setFileManager()` if it wasn't configured before. However, the
implementation of that setter was buggy. This PR fixes the bug, and
moves us closer to the long-term goal of `CompilerInstance` requiring
the VFS to be configured explicitly and owned by the instance.
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
| -rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 584436665622..374138fe4cf8 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -160,8 +160,6 @@ bool CompilerInstance::createTarget() { } void CompilerInstance::setFileManager(IntrusiveRefCntPtr<FileManager> Value) { - if (!hasVirtualFileSystem()) - setVirtualFileSystem(Value->getVirtualFileSystemPtr()); assert(Value == nullptr || getVirtualFileSystemPtr() == Value->getVirtualFileSystemPtr()); FileMgr = std::move(Value); |
