diff options
| author | bors <bors@rust-lang.org> | 2021-05-01 07:48:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-05-01 07:48:24 +0000 |
| commit | 1c2c6b670023efda0fea8e1837f9542d3ed12f5d (patch) | |
| tree | d193bf641984b88b313e848c7c194a62925ebd61 /compiler/rustc_codegen_llvm/src/asm.rs | |
| parent | 3d67e0747238c392bfb03984db132576aa19bec1 (diff) | |
| parent | 0312bf5fb919cb22280367ff445d4a9cbd842539 (diff) | |
| download | rust-1c2c6b670023efda0fea8e1837f9542d3ed12f5d.tar.gz rust-1c2c6b670023efda0fea8e1837f9542d3ed12f5d.zip | |
Auto merge of #84582 - richkadel:issue-84561, r=tmandry
Vastly improves coverage spans for macros Fixes: #84561 This resolves problems where macros like `trace!(...)` would show zero coverage if tracing was disabled, and `assert_eq!(...)` would show zero coverage if the assertion did not fail, because only one coverage span was generated, for the branch. This PR started with an idea that I could just drop branching blocks with same span as expanded macro. (See the fixed issue for more details.) That did help, but it didn't resolve everything. I also needed to add a span specifically for the macro name (plus `!`) to ensure the macro gets coverage even if it's internal expansion adds conditional branching blocks that are retained, and would otherwise drop the outer span. Now that outer span is _only_ the `(argument, list)`, which can safely be dropped now), because the macro name has its own span. While testing, I also noticed the spanview debug output can cause an ICE on a function with no body. The workaround for this is included in this PR (separate commit). r? `@tmandry` cc? `@wesleywiser`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/asm.rs')
0 files changed, 0 insertions, 0 deletions
