Skip to content

Commit ed21805

Browse files
debuginfo: Bring back DW_AT_containing_type for vtables -- address review comments
1 parent fc7f419 commit ed21805

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -2662,11 +2662,13 @@ fn vtable_type_metadata<'ll, 'tcx>(
26622662
}
26632663
ty::VtblEntry::Method(_) => {
26642664
// Note: This code does not try to give a proper name to each method
2665-
// because their might be multiple methods with the same name
2665+
// because there might be multiple methods with the same name
26662666
// (coming from different traits).
26672667
(format!("__method{}", index), void_pointer_type_debuginfo)
26682668
}
26692669
ty::VtblEntry::TraitVPtr(_) => {
2670+
// Note: In the future we could try to set the type of this pointer
2671+
// to the type that we generate for the corresponding vtable.
26702672
(format!("__super_trait_ptr{}", index), void_pointer_type_debuginfo)
26712673
}
26722674
ty::VtblEntry::MetadataAlign => ("align".to_string(), usize_debuginfo),

compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ fn push_debuginfo_type_name<'tcx>(
470470
}
471471

472472
pub enum VTableNameKind {
473-
// Is the name for const/static holding the vtable?
473+
// Is the name for the const/static holding the vtable?
474474
GlobalVariable,
475475
// Is the name for the type of the vtable?
476476
Type,

0 commit comments

Comments
 (0)