]> git.lizzy.rs Git - rust.git/commit - src/tools/clippy/clippy_lints/src/functions/not_unsafe_ptr_arg_deref.rs
Rollup merge of #107373 - michaelwoerister:dont-merge-vtables-when-debuginfo, r=Waffl...
authorMatthias Krüger <matthias.krueger@famsik.de>
Sat, 28 Jan 2023 04:20:19 +0000 (05:20 +0100)
committerGitHub <noreply@github.com>
Sat, 28 Jan 2023 04:20:19 +0000 (05:20 +0100)
commitc89bb159f6d1e9049f9c42a3eb8d0f355524f029
tree1e9ed15684db09f0ecf9f80562834014378a4c4c
parentab769a0bac7e20549caa451742331674c940eed5
parente5995e61687673dca684914b774d1456160f1891
Rollup merge of #107373 - michaelwoerister:dont-merge-vtables-when-debuginfo, r=WaffleLapkin

Don't merge vtables when full debuginfo is enabled.

This PR makes the compiler not emit the `unnamed_addr` attribute for vtables when full debuginfo is enabled, so that they don't get merged even if they have the same contents. This allows debuggers to more reliably map from a dyn pointer to the self-type of a trait object by looking at the vtable's debuginfo.

The PR only changes the behavior of the LLVM backend as other backends don't emit vtable debuginfo (as far as I can tell).

The performance impact of this change should be small as [measured](https://github.com/rust-lang/rust/pull/103514#issuecomment-1290833854) in a previous PR.