Skip to content

Commit 47b0052

Browse files
authored
[CoverageMapping] Avoid use of pow() resulting in solaris build fail (#75559)
Fixes a build failure introduced by commit 8ecbb04 ("Reland [Coverage][llvm-cov] Enable MC/DC Support in LLVM Source-based Code Coverage (2/3)") Use of pow() is not necessary.
1 parent 711809f commit 47b0052

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/ProfileData/Coverage/CoverageMapping.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ class MCDCRecordProcessor {
281281
: ExecutedTestVectorBitmap(Bitmap), Region(Region), Branches(Branches),
282282
NumConditions(Region.MCDCParams.NumConditions),
283283
Folded(NumConditions, false), IndependencePairs(NumConditions),
284-
TestVectors(pow(2, NumConditions)) {}
284+
TestVectors((size_t)1 << NumConditions) {}
285285

286286
private:
287287
void recordTestVector(MCDCRecord::TestVector &TV,

0 commit comments

Comments
 (0)