We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a460885 commit 0285394Copy full SHA for 0285394
clang/lib/CodeGen/CoverageMappingGen.cpp
@@ -946,8 +946,12 @@ struct CounterCoverageMappingBuilder
946
auto ExecCnt = Counter::getCounter(TheMap.first);
947
auto SkipExpr = Builder.subtract(ParentCnt, ExecCnt);
948
949
- if (!llvm::EnableSingleByteCoverage)
+ if (!llvm::EnableSingleByteCoverage || !SkipExpr.isExpression()) {
950
+ assert(
951
+ !TheMap.getIsCounterPair().second &&
952
+ "SkipCnt shouldn't be allocated but refer to an existing counter.");
953
return {ExecCnt, SkipExpr};
954
+ }
955
956
// Assign second if second is not assigned yet.
957
if (!TheMap.getIsCounterPair().second)
0 commit comments