[llvm] 6d0b718 - [Profile][CoverageMapping] MC/DC Fix passing FileID for DecisionRegion
Alan Phipps via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 18 07:19:15 PST 2024
Author: Alan Phipps
Date: 2024-01-18T09:19:02-06:00
New Revision: 6d0b718e8c5465966169ec9071d20cdce838ca91
URL: https://github.com/llvm/llvm-project/commit/6d0b718e8c5465966169ec9071d20cdce838ca91
DIFF: https://github.com/llvm/llvm-project/commit/6d0b718e8c5465966169ec9071d20cdce838ca91.diff
LOG: [Profile][CoverageMapping] MC/DC Fix passing FileID for DecisionRegion
Fixes oversight in commit 8ecbb0404d740d1ab173554e47cef39cd5e3ef8c in which
FileID was not being set when creating a new MC/DC DecisionRegion.
Added:
Modified:
llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h b/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
index 2757b8cd54a69c..2a857917136a84 100644
--- a/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
+++ b/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
@@ -295,12 +295,11 @@ struct CounterMappingRegion {
Kind(Kind) {}
CounterMappingRegion(MCDCParameters MCDCParams, unsigned FileID,
- unsigned ExpandedFileID, unsigned LineStart,
- unsigned ColumnStart, unsigned LineEnd,
- unsigned ColumnEnd, RegionKind Kind)
- : MCDCParams(MCDCParams), ExpandedFileID(ExpandedFileID),
- LineStart(LineStart), ColumnStart(ColumnStart), LineEnd(LineEnd),
- ColumnEnd(ColumnEnd), Kind(Kind) {}
+ unsigned LineStart, unsigned ColumnStart,
+ unsigned LineEnd, unsigned ColumnEnd, RegionKind Kind)
+ : MCDCParams(MCDCParams), FileID(FileID), LineStart(LineStart),
+ ColumnStart(ColumnStart), LineEnd(LineEnd), ColumnEnd(ColumnEnd),
+ Kind(Kind) {}
static CounterMappingRegion
makeRegion(Counter Count, unsigned FileID, unsigned LineStart,
@@ -354,7 +353,7 @@ struct CounterMappingRegion {
makeDecisionRegion(MCDCParameters MCDCParams, unsigned FileID,
unsigned LineStart, unsigned ColumnStart, unsigned LineEnd,
unsigned ColumnEnd) {
- return CounterMappingRegion(MCDCParams, FileID, 0, LineStart, ColumnStart,
+ return CounterMappingRegion(MCDCParams, FileID, LineStart, ColumnStart,
LineEnd, ColumnEnd, MCDCDecisionRegion);
}
More information about the llvm-commits
mailing list