From f083a242eb9fe2934b7ac9719fc6db18bbfb725f Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 25 Sep 2025 15:00:10 -0700 Subject: [PATCH] [clang] Pass `-fbasic-block-sections=list=` through the VFS --- clang/lib/CodeGen/BackendUtil.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index d2ab7aa0b0369..3f38741f24a60 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -437,7 +437,8 @@ static bool initTargetOptions(const CompilerInstance &CI, if (Options.BBSections == llvm::BasicBlockSection::List) { ErrorOr> MBOrErr = - MemoryBuffer::getFile(CodeGenOpts.BBSections.substr(5)); + CI.getVirtualFileSystem().getBufferForFile( + CodeGenOpts.BBSections.substr(5)); if (!MBOrErr) { Diags.Report(diag::err_fe_unable_to_load_basic_block_sections_file) << MBOrErr.getError().message();