[compiler-rt] [llvm] [Coverage] Make SingleByteCoverage work consistent to merging (PR #110972)

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 5 01:26:46 PDT 2024


================
@@ -873,8 +874,10 @@ Error CoverageMapping::loadFunctionRecord(
       consumeError(std::move(E));
       return Error::success();
     }
-    Function.pushRegion(Region, *ExecutionCount, *AltExecutionCount,
-                        ProfileReader.hasSingleByteCoverage());
+    Function.pushRegion(
+        Region, (SingleByteCoverage && *ExecutionCount ? 1 : *ExecutionCount),
+        (SingleByteCoverage && *AltExecutionCount ? 1 : *AltExecutionCount),
+        SingleByteCoverage);
----------------
chapuni wrote:

The last arg will be pruned after #110966.

https://github.com/llvm/llvm-project/pull/110972


More information about the llvm-commits mailing list