aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2025-09-29 14:37:18 -0700
committerGitHub <noreply@github.com>2025-09-29 21:37:18 +0000
commitcbfe89f0ecf6c9dfc047b39f3b12f0532d8ddeb2 (patch)
treefc092517e8c20c424e60c0b3cc191cd455d9a126 /clang/lib/CodeGen/BackendUtil.cpp
parent12a5854a51c99635dd72b26a73d6ff89d6a5bc81 (diff)
downloadllvm-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.cpp5
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))