Propagate llvm::vfs::FileSystem from driver_env to Clang (#4537)

As discussed in #4530 . This required switching to using
`llvm::IntrusiveRefCntPtr` in a number of places.

---------

Co-authored-by: Josh L <josh11b@users.noreply.github.com>
This commit is contained in:
josh11b
2024-11-18 18:24:19 +00:00
committed by GitHub
co-authored by Josh L
parent 825714f06b
commit 47bfa375af
23 changed files with 80 additions and 56 deletions
+2 -1
View File
@@ -74,7 +74,8 @@ auto FormatSubcommand::Run(DriverEnv& driver_env) -> DriverResult {
// TODO: Consider refactoring this for sharing with compile.
// TODO: Decide what to do with `-` when there are multiple arguments.
auto source = SourceBuffer::MakeFromFileOrStdin(driver_env.fs, f, consumer);
auto source =
SourceBuffer::MakeFromFileOrStdin(*driver_env.fs, f, consumer);
if (!source) {
mark_per_file_error();
continue;