diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2025-09-29 14:37:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-29 21:37:18 +0000 |
commit | cbfe89f0ecf6c9dfc047b39f3b12f0532d8ddeb2 (patch) | |
tree | fc092517e8c20c424e60c0b3cc191cd455d9a126 /clang/lib/CodeGen/BackendUtil.cpp | |
parent | 12a5854a51c99635dd72b26a73d6ff89d6a5bc81 (diff) | |
download | llvm-cbfe89f0ecf6c9dfc047b39f3b12f0532d8ddeb2.zip llvm-cbfe89f0ecf6c9dfc047b39f3b12f0532d8ddeb2.tar.gz llvm-cbfe89f0ecf6c9dfc047b39f3b12f0532d8ddeb2.tar.bz2 |
[llvm][clang] Use the VFS in `GCOVProfilerPass` (#161260)
This PR starts using the correct VFS in `GCOVProfilerPass` instead of
using the real FS directly. This matches compiler's behavior for other
input files.
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 57db20f7..64f1917 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -1090,8 +1090,9 @@ void EmitAssemblyHelper::RunOptimizationPipeline( if (std::optional<GCOVOptions> Options = getGCOVOptions(CodeGenOpts, LangOpts)) PB.registerPipelineStartEPCallback( - [Options](ModulePassManager &MPM, OptimizationLevel Level) { - MPM.addPass(GCOVProfilerPass(*Options)); + [this, Options](ModulePassManager &MPM, OptimizationLevel Level) { + MPM.addPass( + GCOVProfilerPass(*Options, CI.getVirtualFileSystemPtr())); }); if (std::optional<InstrProfOptions> Options = getInstrProfOptions(CodeGenOpts, LangOpts)) |