Skip to content

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

Merged
bors merged 1 commit intorust-lang:masterfrom
michaelwoerister:remove-unused-span-debuginfo
Jan 18, 2022
Merged

rustc_codegen_llvm: Remove (almost) unused span parameter from many functions in metadata.rs#92729
bors merged 1 commit intorust-lang:masterfrom
michaelwoerister:remove-unused-span-debuginfo

Conversation

@michaelwoerister
Copy link
Copy Markdown
Member

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:

    // Ignore source location information as long as it
    // can't be reconstructed for non-local crates.
    _file_metadata: &'ll DIFile,
    _definition_span: Span,

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants