Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3122db7
Implement `SpecOptionPartialEq` for `cmp::Ordering`
scottmcm Jan 18, 2023
da3ecb0
Use proper InferCtxt when probing for associated types in astconv
compiler-errors Jan 22, 2023
800f1f3
Liberate late-bound regions correctly
compiler-errors Jan 25, 2023
b83ab0c
Suggest mutable borrows correctly
compiler-errors Jan 25, 2023
381187d
internally change regions to be covariant
aliemjay Jan 26, 2023
43cb610
update comment on trait objects
aliemjay Jan 27, 2023
e5995e6
Don't merge vtables when full debuginfo is enabled.
michaelwoerister Jan 27, 2023
5bfd90e
Use now solver in evaluate_obligation
compiler-errors Jan 27, 2023
80a1536
recover more unbraced const args
fmease Jan 22, 2023
ff2413d
No need to probe when computing goals
compiler-errors Jan 27, 2023
0654374
Add some comments
compiler-errors Jan 27, 2023
8a0b215
Micro-optimization in consider_assumption
compiler-errors Jan 27, 2023
3e9d1e4
Link to the LLVM issue from a comment on `SpecOptionPartialEq`
scottmcm Jan 28, 2023
7b78b6a
Rollup merge of #107022 - scottmcm:ordering-option-eq, r=m-ou-se
matthiaskrgr Jan 28, 2023
28188d1
Rollup merge of #107100 - compiler-errors:issue-107087, r=lcnr
matthiaskrgr Jan 28, 2023
3b6593a
Rollup merge of #107103 - compiler-errors:new-solver-evaluate_obligat…
matthiaskrgr Jan 28, 2023
260e048
Rollup merge of #107190 - fmease:fix-81698, r=compiler-errors
matthiaskrgr Jan 28, 2023
fa2cd94
Rollup merge of #107306 - compiler-errors:correct-sugg-for-closure-ar…
matthiaskrgr Jan 28, 2023
a5caa98
Rollup merge of #107339 - aliemjay:covariant, r=lcnr
matthiaskrgr Jan 28, 2023
ab769a0
Rollup merge of #107344 - compiler-errors:new-solver-tweaks, r=lcnr
matthiaskrgr Jan 28, 2023
c89bb15
Rollup merge of #107373 - michaelwoerister:dont-merge-vtables-when-de…
matthiaskrgr Jan 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't merge vtables when full debuginfo is enabled.
  • Loading branch information
michaelwoerister committed Jan 27, 2023
commit e5995e61687673dca684914b774d1456160f1891
5 changes: 5 additions & 0 deletions compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,11 @@ pub fn create_vtable_di_node<'ll, 'tcx>(
return;
}

// When full debuginfo is enabled, we want to try and prevent vtables from being
// merged. Otherwise debuggers will have a hard time mapping from dyn pointer
// to concrete type.
llvm::SetUnnamedAddress(vtable, llvm::UnnamedAddr::No);

let vtable_name =
compute_debuginfo_vtable_name(cx.tcx, ty, poly_trait_ref, VTableNameKind::GlobalVariable);
let vtable_type_di_node = build_vtable_type_di_node(cx, ty, poly_trait_ref);
Expand Down
8 changes: 8 additions & 0 deletions tests/codegen/debug-vtable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
// compile-flags: -Cdebuginfo=2 -Copt-level=0 -Csymbol-mangling-version=v0
// ignore-tidy-linelength

// Make sure that vtables don't have the unnamed_addr attribute when debuginfo is enabled.
// This helps debuggers more reliably map from dyn pointer to concrete type.
// CHECK: @vtable.0 = private constant <{
// CHECK: @vtable.1 = private constant <{
// CHECK: @vtable.2 = private constant <{
// CHECK: @vtable.3 = private constant <{
// CHECK: @vtable.4 = private constant <{

// NONMSVC: ![[USIZE:[0-9]+]] = !DIBasicType(name: "usize"
// MSVC: ![[USIZE:[0-9]+]] = !DIDerivedType(tag: DW_TAG_typedef, name: "usize"
// NONMSVC: ![[PTR:[0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, name: "*const ()"
Expand Down