On 27.10.2025 23:36, Andrew Cooper wrote: > On 27/10/2025 9:30 pm, Saman Dehghan wrote: >> This change enables compatibility for measuring code coverage >> with Clang versions 11 through 20 by supporting their respective raw >> profile formats. >> >> 1- Added support for LLVM raw profile versions 5, 6, 7, 8, 9, and 10. >> 2- Initialized llvm_profile_header for all versions based on llvm source >> code in compiler-rt/include/profile/InstrProfData.inc for each version. >> 3- We tested this patch for all Clang versions from 11 through 20 >> on x86 platform. >> 4- Fixed linking warnings related to LLVM profile sections in x86. >> >> >> Signed-off-by: Saman Dehghan <[email protected]> >> Release-Acked-By: Oleksii Kurochko <[email protected]> >> Tested-by: Wentao Zhang <[email protected]> >> Acked-by: Andrew Cooper <[email protected]> >> --- >> Changes from v3 to v4: >> 1- Use LLVM_PROFILE_VERSION in preprocessor conditionals >> instead of __clang_major__. >> 2- Use DIV_ROUND_UP helper. >> 3- Remove unnecessary zero initialization inside struct. >> 4- Remove fallback macro definitions in linker script. >> Changes from v2 to v3: >> 1- Additionally support raw profile version 5, 6, 7 in clang 11, 12, 13. >> 2- Fix coverage related linking warnings in x86. >> 3- Revert unnecessary type changes, casting, etc. >> --- > > Excellent. Thankyou. This all looks in order. I've committed it.
I thought I would backport this, but I would need a variant that wouldn't regress profile version 4 on the older branches. Jan
