[all-commits] [llvm/llvm-project] 8280ec: [Coverage] Support overriding compilation directory
Petr Hosek via All-commits
all-commits at lists.llvm.org
Tue May 11 15:27:14 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8280ece0c972db24e51aae5074ca5433002f1071
https://github.com/llvm/llvm-project/commit/8280ece0c972db24e51aae5074ca5433002f1071
Author: Petr Hosek <phosek at google.com>
Date: 2021-05-11 (Tue, 11 May 2021)
Changed paths:
M llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
M llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h
M llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
M llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
A llvm/test/tools/llvm-cov/Inputs/compilation_dir.covmapping
A llvm/test/tools/llvm-cov/Inputs/compilation_dir.proftext
A llvm/test/tools/llvm-cov/compilation_dir.c
M llvm/tools/llvm-cov/CodeCoverage.cpp
M llvm/tools/llvm-cov/CoverageViewOptions.h
M llvm/unittests/ProfileData/CoverageMappingTest.cpp
Log Message:
-----------
[Coverage] Support overriding compilation directory
When making compilation relocatable, for example in distributed
compilation scenarios, we want to set compilation dir to a relative
value like `.` but this presents a problem when generating reports
because if the file path is relative as well, for example `..`, you
may end up writing files outside of the output directory.
This change introduces a flag that allows overriding the compilation
directory that's stored inside the profile with a different value that
is absolute.
Differential Revision: https://reviews.llvm.org/D100232
More information about the All-commits
mailing list