[clang] Load -fbasic-block-sections=list= through the VFS (#160785)
This PR loads the path from `-fbasic-block-sections=list=<path>` through the VFS rather than going straight to the real file system. This matches the behavior of other input files of the compiler.
This commit is contained in:
parent
70eb6cc662
commit
078a4e93da
@ -437,7 +437,8 @@ static bool initTargetOptions(const CompilerInstance &CI,
|
||||
|
||||
if (Options.BBSections == llvm::BasicBlockSection::List) {
|
||||
ErrorOr<std::unique_ptr<MemoryBuffer>> 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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user