[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)
Zequan Wu via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 15 09:03:15 PST 2023
================
@@ -569,16 +577,26 @@ struct CounterCoverageMappingBuilder
/// Return a counter for the subtraction of \c RHS from \c LHS
Counter subtractCounters(Counter LHS, Counter RHS, bool Simplify = true) {
+ if (llvm::EnableSingleByteCoverage)
+ assert(
+ 0 &&
+ "cannot subtract counters when single byte coverage mode is enabled");
----------------
ZequanWu wrote:
This can be simplifies to `assert(!llvm::EnableSingleByteCoverage && "cannot subtract counters when single byte coverage mode is enabled")`. Same for the following asserts.
https://github.com/llvm/llvm-project/pull/75425
More information about the cfe-commits
mailing list