rust/compiler/rustc_codegen_ssa
Guillaume Gomez e611e64e3a
Rollup merge of #85215 - richkadel:ice-fixes-minus-dead-blocks, r=tmandry
coverage bug fixes and some refactoring

This replaces the relevant commits (2 and 3) from PR #85082, and also corrects an error querying for coverageinfo.

1. `coverageinfo` query needs to use the same MIR as codegen

I ran into an error trying to fix dead block coverage and realized the
`coverageinfo` query is getting a different MIR compared to the
codegenned MIR, which can sometimes be a problem during mapgen.

I changed that query to use the `InstandeDef` (which includes the
generic parameter substitutions, prosibly specific to const params)
instead of the `DefId` (without unknown/default const substitutions).

2. Simplified body_span and filtered span code

  Some code cleanup extracted from future (but unfinished) commit to fix
  coverage in attr macro functions.

3. Spanview needs the relevant body_span used for coverage

The coverage body_span doesn't always match the function body_span.

r? ```@tmandry```
2021-05-15 13:29:49 +02:00
..
src Rollup merge of #85215 - richkadel:ice-fixes-minus-dead-blocks, r=tmandry 2021-05-15 13:29:49 +02:00
Cargo.toml Auto merge of #83640 - bjorn3:shared_metadata_reader, r=nagisa 2021-05-14 12:58:58 +00:00
README.md

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.