diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2023-01-27 15:29:04 +0000 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2023-01-27 15:29:04 +0000 |
| commit | e5995e61687673dca684914b774d1456160f1891 (patch) | |
| tree | 395d92bba2f99cef1780481cd44ca83e6ddecc05 /compiler/rustc_codegen_llvm/src/debuginfo | |
| parent | 6874f4e3fc2a16be7c78e702d068bbc1daa90e16 (diff) | |
| download | rust-e5995e61687673dca684914b774d1456160f1891.tar.gz rust-e5995e61687673dca684914b774d1456160f1891.zip | |
Don't merge vtables when full debuginfo is enabled.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs index b6eb5ee183f..f73bbf3d22b 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs @@ -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); |
