[llvm] 71648a4 - Make MCDCRecord::getNumConditions() `const&`
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 28 01:10:21 PST 2024
Author: NAKAMURA Takumi
Date: 2024-11-28T18:09:27+09:00
New Revision: 71648a4ef93867ce47afa512f6cf808be3cd0a2e
URL: https://github.com/llvm/llvm-project/commit/71648a4ef93867ce47afa512f6cf808be3cd0a2e
DIFF: https://github.com/llvm/llvm-project/commit/71648a4ef93867ce47afa512f6cf808be3cd0a2e.diff
LOG: Make MCDCRecord::getNumConditions() `const&`
Some users were trying to get a reference to the return value.
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 e631e3899fd4de..590185d42e72a6 100644
--- a/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
+++ b/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
@@ -461,7 +461,7 @@ struct MCDCRecord {
Folded(std::move(Folded)), PosToID(std::move(PosToID)),
CondLoc(std::move(CondLoc)){};
- CounterMappingRegion getDecisionRegion() const { return Region; }
+ const CounterMappingRegion &getDecisionRegion() const { return Region; }
unsigned getNumConditions() const {
return Region.getDecisionParams().NumConditions;
}
More information about the llvm-commits
mailing list