Loading
[Coverage] Fix quadratic propagation in RawCoverageMappingReader (#194996)
``` llvm-cov export /tmp/Cov/bin/lld -instr-profile=/tmp/Cov/cov.profdata -format=lcov --sources lld/ELF/Arch/RISCV.cpp ``` does not finish after minutes. Root cause: The expansion-region count propagation loop is bounded by `VirtualFileMapping.size()`, the number of macro expansions. In the TableGen-generated `RISCVGenDAGISel.inc` (depended on by LLVMLTO), `NumFileMappings` is 74941 (largely due to the `TARGET_VAL` macro). With 149887 mapping regions, the loop does not finish after more than ten minutes. Fix with an early break.