Skip to content

Commit

Permalink
Rollup merge of #131956 - Zalathar:llvm-counters, r=compiler-errors,S…
Browse files Browse the repository at this point in the history
…watinem

coverage: Pass coverage mappings to LLVM as separate structs

Instead of trying to cram *N* different kinds of coverage mapping data into a single list for FFI, pass *N* different lists of simpler structs.

This avoids the need to fill unused fields with dummy values, and avoids the need to tag structs with their underlying kind. It also lets us call the dedicated LLVM constructors for each different mapping type, instead of having to go through the complex general-purpose constructor.

Even though this adds multiple new structs to the FFI surface area, the resulting C++ code is simpler and shorter.

---

I've structured this mostly as a single atomic patch, rather than a series of incremental changes, because that avoids the need to make fiddly fixes to code that is about to be deleted anyway.
  • Loading branch information
Zalathar authored Oct 24, 2024
2 parents f7f411d + d1bf77e commit 8f354fc
Show file tree
Hide file tree
Showing 5 changed files with 220 additions and 444 deletions.
Loading

0 comments on commit 8f354fc

Please sign in to comment.