Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Instrumentation] Fix EdgeCounts vector size in SetBranchWeights
SetBranchWeights() calculates the size of the EdgeCounts vector using OutEdges.Size(), but this is an under-estimate with coroutines. Use the number of successors, as the vector will be indexed by the result of the GetSuccessorNumber() function. This crashes in 18.1, but somehow doesn't in main. Still, it looks like the fix is applicable to both. Fixes llvm#97962
- Loading branch information