https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/173288
>From 562953106a2679bc1bba961d512c173fe83220d4 Mon Sep 17 00:00:00 2001 From: Jan Svoboda <[email protected]> Date: Mon, 22 Dec 2025 09:12:08 -0800 Subject: [PATCH 1/2] [clang] Reuse configured VFS for chained includes --- clang/lib/Frontend/ChainedIncludesSource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Frontend/ChainedIncludesSource.cpp b/clang/lib/Frontend/ChainedIncludesSource.cpp index 049277c2df7a9..048ce03d09a3e 100644 --- a/clang/lib/Frontend/ChainedIncludesSource.cpp +++ b/clang/lib/Frontend/ChainedIncludesSource.cpp @@ -124,7 +124,7 @@ clang::createChainedIncludesSource(CompilerInstance &CI, auto Clang = std::make_unique<CompilerInstance>( std::move(CInvok), CI.getPCHContainerOperations()); - Clang->createVirtualFileSystem(); + Clang->setVirtualFileSystem(CI.getVirtualFileSystemPtr()); Clang->setDiagnostics(Diags); Clang->setTarget(TargetInfo::CreateTargetInfo( Clang->getDiagnostics(), Clang->getInvocation().getTargetOpts())); >From 1c85fa4223430d98f07721b53f83ae15ad3c3a5c Mon Sep 17 00:00:00 2001 From: Jan Svoboda <[email protected]> Date: Mon, 5 Jan 2026 11:54:13 -0800 Subject: [PATCH 2/2] Add a comment --- clang/lib/Frontend/ChainedIncludesSource.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/lib/Frontend/ChainedIncludesSource.cpp b/clang/lib/Frontend/ChainedIncludesSource.cpp index 048ce03d09a3e..2338698cee9d1 100644 --- a/clang/lib/Frontend/ChainedIncludesSource.cpp +++ b/clang/lib/Frontend/ChainedIncludesSource.cpp @@ -124,6 +124,8 @@ clang::createChainedIncludesSource(CompilerInstance &CI, auto Clang = std::make_unique<CompilerInstance>( std::move(CInvok), CI.getPCHContainerOperations()); + // Inherit the VFS as-is: code below does not make changes to the VFS or to + // the VFS-affecting options. Clang->setVirtualFileSystem(CI.getVirtualFileSystemPtr()); Clang->setDiagnostics(Diags); Clang->setTarget(TargetInfo::CreateTargetInfo( _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
