Don't merge vtables when full debuginfo is enabled.
This commit is contained in:
parent
6874f4e3fc
commit
e5995e6168
2 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue