Skip to content

Commit

Permalink
Rollup merge of #92729 - michaelwoerister:remove-unused-span-debuginf…
Browse files Browse the repository at this point in the history
…o, r=petrochenkov

rustc_codegen_llvm: Remove (almost) unused span parameter from many functions in metadata.rs

Many functions and intermediate data structures in `rustc_codegen_llvm/src/debuginfo/metadata.rs` take a span parameter that is only used for providing a span to a `span_bug!()` invocation, in case the debuginfo typemap gets corrupted. However, this span does not really convey useful information as it just points to the first point a type is used -- and half of the time is initialized to `DUMMY_SP`.

This PR removes this span parameter from the module.

It also removes the following unused parameters from `composite_type_metadata()` together with an outdated comment:

```rust
    // Ignore source location information as long as it
    // can't be reconstructed for non-local crates.
    _file_metadata: &'ll DIFile,
    _definition_span: Span,
```
  • Loading branch information
matthiaskrgr authored Jan 17, 2022
2 parents 32d85c0 + 9a79ab6 commit 97743d9
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 130 deletions.
Loading

0 comments on commit 97743d9

Please sign in to comment.