Skip to content

Commit 7033f75

Browse files
Create more accurate debuginfo for vtables.
Before this commit all vtables would have the same name "vtable" in debuginfo. Now they get a name that identifies the implementing type and the trait that is being implemented.
1 parent 27a819e commit 7033f75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/debuginfo.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use gccjit::RValue;
22
use rustc_codegen_ssa::mir::debuginfo::{FunctionDebugContext, VariableKind};
33
use rustc_codegen_ssa::traits::{DebugInfoBuilderMethods, DebugInfoMethods};
44
use rustc_middle::mir;
5-
use rustc_middle::ty::{Instance, Ty};
5+
use rustc_middle::ty::{Instance, PolyExistentialTraitRef, Ty};
66
use rustc_span::{SourceFile, Span, Symbol};
77
use rustc_target::abi::Size;
88
use rustc_target::abi::call::FnAbi;
@@ -31,7 +31,7 @@ impl<'a, 'gcc, 'tcx> DebugInfoBuilderMethods for Builder<'a, 'gcc, 'tcx> {
3131
}
3232

3333
impl<'gcc, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
34-
fn create_vtable_metadata(&self, _ty: Ty<'tcx>, _vtable: Self::Value) {
34+
fn create_vtable_metadata(&self, _ty: Ty<'tcx>, _trait_ref: Option<PolyExistentialTraitRef<'tcx>>, _vtable: Self::Value) {
3535
// TODO(antoyo)
3636
}
3737

0 commit comments

Comments
 (0)