debuginfo: Bring back DW_AT_containing_type for vtables -- address review comments
This commit is contained in:
parent
fc7f419a63
commit
ed21805aee
2 changed files with 4 additions and 2 deletions
|
@ -2662,11 +2662,13 @@ fn vtable_type_metadata<'ll, 'tcx>(
|
||||||
}
|
}
|
||||||
ty::VtblEntry::Method(_) => {
|
ty::VtblEntry::Method(_) => {
|
||||||
// Note: This code does not try to give a proper name to each method
|
// Note: This code does not try to give a proper name to each method
|
||||||
// because their might be multiple methods with the same name
|
// because there might be multiple methods with the same name
|
||||||
// (coming from different traits).
|
// (coming from different traits).
|
||||||
(format!("__method{}", index), void_pointer_type_debuginfo)
|
(format!("__method{}", index), void_pointer_type_debuginfo)
|
||||||
}
|
}
|
||||||
ty::VtblEntry::TraitVPtr(_) => {
|
ty::VtblEntry::TraitVPtr(_) => {
|
||||||
|
// Note: In the future we could try to set the type of this pointer
|
||||||
|
// to the type that we generate for the corresponding vtable.
|
||||||
(format!("__super_trait_ptr{}", index), void_pointer_type_debuginfo)
|
(format!("__super_trait_ptr{}", index), void_pointer_type_debuginfo)
|
||||||
}
|
}
|
||||||
ty::VtblEntry::MetadataAlign => ("align".to_string(), usize_debuginfo),
|
ty::VtblEntry::MetadataAlign => ("align".to_string(), usize_debuginfo),
|
||||||
|
|
|
@ -470,7 +470,7 @@ fn push_debuginfo_type_name<'tcx>(
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum VTableNameKind {
|
pub enum VTableNameKind {
|
||||||
// Is the name for const/static holding the vtable?
|
// Is the name for the const/static holding the vtable?
|
||||||
GlobalVariable,
|
GlobalVariable,
|
||||||
// Is the name for the type of the vtable?
|
// Is the name for the type of the vtable?
|
||||||
Type,
|
Type,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue