aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2024-12-19 08:41:28 +0900
committerGitHub <noreply@github.com>2024-12-19 08:41:28 +0900
commite6980796585940bffd8c9e95052761c1a32c1dfe (patch)
tree0e62c04ab2fdf1cd6d39e193ede783ac807a031f /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
parentef955908302b6a6170e9775d89a94846fde12ebf (diff)
downloadllvm-e6980796585940bffd8c9e95052761c1a32c1dfe.zip
llvm-e6980796585940bffd8c9e95052761c1a32c1dfe.tar.gz
llvm-e6980796585940bffd8c9e95052761c1a32c1dfe.tar.bz2
Allow `CoverageMapping::getCoverageForFile()` to show Branches also outside functions (#120416)
Fixes #119952
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
-rw-r--r--llvm/lib/ProfileData/Coverage/CoverageMapping.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
index 119e091..d514485 100644
--- a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
+++ b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
@@ -1412,7 +1412,7 @@ CoverageData CoverageMapping::getCoverageForFile(StringRef Filename) const {
}
// Capture branch regions specific to the function (excluding expansions).
for (const auto &CR : Function.CountedBranchRegions)
- if (FileIDs.test(CR.FileID) && (CR.FileID == CR.ExpandedFileID))
+ if (FileIDs.test(CR.FileID))
FileCoverage.BranchRegions.push_back(CR);
// Capture MCDC records specific to the function.
for (const auto &MR : Function.MCDCRecords)