diff options
| author | bors <bors@rust-lang.org> | 2021-04-27 07:29:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-04-27 07:29:26 +0000 |
| commit | e1886935b78e62a6c23a243e48f81815ae7fd141 (patch) | |
| tree | e599b6d445384821dac81e6da3bf11d939ea9d51 /compiler/rustc_llvm/llvm-wrapper/Linker.cpp | |
| parent | 22b686ad9995266b695344fcfb8e14f710b9ea6b (diff) | |
| parent | 31cba57ea56e7444c75d62b3a1bebad8f5f74432 (diff) | |
| download | rust-e1886935b78e62a6c23a243e48f81815ae7fd141.tar.gz rust-e1886935b78e62a6c23a243e48f81815ae7fd141.zip | |
Auto merge of #84532 - richkadel:issue-83792, r=tmandry
Fix coverage ICE because fn_sig can have a span that crosses file bou… Fixes: #83792 MIR `InstrumentCoverage` assumed the `FnSig` span was contained within a single file, but this is not always the case. Some macro constructions can result in a span that starts in one `SourceFile` and ends in a different one. The `FnSig` span is included in coverage results as long as that span is in the same `SourceFile` and the same macro context, but by assuming the `FnSig` span's `hi()` and `lo()` were in the same file, I took this for granted, and checked only that the `FnSig` `hi()` was in the same `SourceFile` as the `body_span`. I actually drop the `hi()` though, and extend the `FnSig` span to the `body_span.lo()`, so I really should have simply checked that the `FnSig` span's `lo()` was in the `SourceFile` of the `body_span`. r? `@tmandry` cc: `@wesleywiser`
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/Linker.cpp')
0 files changed, 0 insertions, 0 deletions
