[clang] [llvm] [ThinLTO] Apply -vfsoverlay to distributed backend inputs (PR #236610)

Anton Yartsev via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 25 15:00:57 PST 2026


================
@@ -57,15 +61,17 @@ LLVM_ABI Error backend(const Config &C, AddStreamFn AddStream,
 /// one source module will be kept open at the most. If \p CodeGenOnly is true,
 /// the backend will skip optimization and only perform code generation. If
 /// \p IRAddStream is not nullptr, it will be called just before code generation
-/// to serialize the optimized IR.
+/// to serialize the optimized IR. If \p FS is not nullptr, module files to be
+/// imported on demand are read through it instead of the real file system.
 LLVM_ABI Error thinBackend(
     const Config &C, unsigned Task, AddStreamFn AddStream, Module &M,
     const ModuleSummaryIndex &CombinedIndex,
     const FunctionImporter::ImportMapTy &ImportList,
     const GVSummaryMapTy &DefinedGlobals,
     MapVector<StringRef, BitcodeModule> *ModuleMap, bool CodeGenOnly,
     ArrayRef<StringRef> BitcodeLibFuncs, AddStreamFn IRAddStream = nullptr,
-    const std::vector<uint8_t> &CmdArgs = std::vector<uint8_t>());
+    const std::vector<uint8_t> &CmdArgs = std::vector<uint8_t>(),
+    vfs::FileSystem *FS = nullptr);
----------------
ayartsev7 wrote:

Oh, I missed that. Done in 7083846. `lto::opt` and `thinBackend` now take the VFS. The driver also checks `-fprofile-sample-use` through the VFS, since it would otherwise reject a profile that exists only in the overlay.

https://github.com/llvm/llvm-project/pull/236610


More information about the cfe-commits mailing list