diff options
| author | stma247 <184293860+stma247@users.noreply.github.com> | 2024-12-02 21:24:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-02 14:24:15 -0600 |
| commit | 0fe1f8524e02a2d28946e8356615f16166670474 (patch) | |
| tree | 20bd60fb8c2af783b1c95058fcb577e03a97e2ed /llvm/tools/llvm-cov/CodeCoverage.cpp | |
| parent | 93d2a2caf63ee9c3dab8b3e0a1b54a9ba484714d (diff) | |
| download | llvm-0fe1f8524e02a2d28946e8356615f16166670474.zip llvm-0fe1f8524e02a2d28946e8356615f16166670474.tar.gz llvm-0fe1f8524e02a2d28946e8356615f16166670474.tar.bz2 | |
[llvm-cov] Fix branch counts of template functions (#111743) (#113925)
Added option "--unify-instantiations" to llvm-cov export to combine
branch execution counts of C++ template instantiations.
on-behalf-of: @e-solutions-GmbH <info@esolutions.de>
Diffstat (limited to 'llvm/tools/llvm-cov/CodeCoverage.cpp')
| -rw-r--r-- | llvm/tools/llvm-cov/CodeCoverage.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp index d06fd86..43ad4c1 100644 --- a/llvm/tools/llvm-cov/CodeCoverage.cpp +++ b/llvm/tools/llvm-cov/CodeCoverage.cpp @@ -1270,6 +1270,10 @@ int CodeCoverageTool::doExport(int argc, const char **argv, cl::desc("Don't export branch data (LCOV)"), cl::cat(ExportCategory)); + cl::opt<bool> UnifyInstantiations("unify-instantiations", cl::Optional, + cl::desc("Unify function instantiations"), + cl::init(true), cl::cat(ExportCategory)); + auto Err = commandLineParser(argc, argv); if (Err) return Err; @@ -1277,6 +1281,7 @@ int CodeCoverageTool::doExport(int argc, const char **argv, ViewOpts.SkipExpansions = SkipExpansions; ViewOpts.SkipFunctions = SkipFunctions; ViewOpts.SkipBranches = SkipBranches; + ViewOpts.UnifyFunctionInstantiations = UnifyInstantiations; if (ViewOpts.Format != CoverageViewOptions::OutputFormat::Text && ViewOpts.Format != CoverageViewOptions::OutputFormat::Lcov) { |
