-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Isolate coverage FFI type layouts from their underlying LLVM C++ types #111382
Conversation
r? @cuviper (rustbot has picked a reviewer for you, use r? to override) |
@rustbot label +A-code-coverage +A-LLVM |
(Note that most or all coverage tests don't run in PR CI, and many of them are silently broken in CI until #111179 lands.) |
The regions don't need to be mutable because we pass a copy of them to LLVM instead, and this matches the `*const` in the Rust-side signature.
Yeesh, that's tedious, but AFAICT it looks good... @bors r+ |
🌲 The tree is currently closed for pull requests below priority 50. This pull request will be tested once the tree is reopened. |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#108705 (Prevent ICE with broken borrow in closure) - rust-lang#111292 (Fix mishandled `--check-cfg` arguments order) - rust-lang#111382 (Isolate coverage FFI type layouts from their underlying LLVM C++ types) - rust-lang#111385 (vec-shrink-panik: update expectations to work on LLVM 17) - rust-lang#111389 (Add esp-idf platform-support page) - rust-lang#111432 (Use visit_assign to detect SSA locals.) - rust-lang#111448 (Use proper impl self type for alias impl in rustdoc) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
I noticed that several of the types used to send coverage information through FFI are not properly isolated from the layout of their corresponding C++ types in the LLVM API.
This PR adds more explicitly-defined FFI struct/enum types in
CoverageMappingWrapper.cpp
, so that Rust source files inrustc_codegen_ssa
andrustc_codegen_llvm
aren't directly exposed to LLVM C++ types.