[llvm] [llvm-cov] Fix branch counts of template functions (#111743) (PR #113925)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 9 01:26:38 PDT 2025


stma247 wrote:

> @stma247 Looks like the LIT test failed on a couple of the build bots. I reverted the commit until that can be addressed.

Hi @evodius96, I must have missed the reverted commit somehow.
However, now I took the time to reproduce the issue and it only seems to show up if EXPENSIVE_CHECKS are enabled. It is related to "llvm::sort" that applies some kind of shuffle if expensive checks are on (see https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/ADT/STLExtras.h#L1676).
The reason why this issue came up with my PR, is that no test for this template ambiguity existed before (see new llvm/test/tools/llvm-cov/branch-export-lcov-unify-instances.test). I can see this indeterministic behavior even on branch "main", if I add test code from "branch-export-lcov-unify-instances.test".

I am working on a solution and will create a new PR.

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


More information about the llvm-commits mailing list