Skip to content

Commit 71648a4

Browse files
committed
Make MCDCRecord::getNumConditions() const&
Some users were trying to get a reference to the return value.
1 parent 89b08c8 commit 71648a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ struct MCDCRecord {
461461
Folded(std::move(Folded)), PosToID(std::move(PosToID)),
462462
CondLoc(std::move(CondLoc)){};
463463

464-
CounterMappingRegion getDecisionRegion() const { return Region; }
464+
const CounterMappingRegion &getDecisionRegion() const { return Region; }
465465
unsigned getNumConditions() const {
466466
return Region.getDecisionParams().NumConditions;
467467
}

0 commit comments

Comments
 (0)