Skip to content

Commit c923f04

Browse files
committed
rustc_codegen_llvm: don't generate Self type debuginfo for methods for -Cdebuginfo=1.
1 parent 7023948 commit c923f04

File tree

1 file changed

+6
-1
lines changed
  • src/librustc_codegen_llvm/debuginfo

1 file changed

+6
-1
lines changed

src/librustc_codegen_llvm/debuginfo/mod.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,12 @@ impl DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> {
475475
// so avoid methods on other types (e.g., `<*mut T>::null`).
476476
match impl_self_ty.kind {
477477
ty::Adt(def, ..) if !def.is_box() => {
478-
Some(type_metadata(cx, impl_self_ty, rustc_span::DUMMY_SP))
478+
// Again, only create type information if full debuginfo is enabled
479+
if cx.sess().opts.debuginfo == DebugInfo::Full {
480+
Some(type_metadata(cx, impl_self_ty, rustc_span::DUMMY_SP))
481+
} else {
482+
Some(namespace::item_namespace(cx, def.did))
483+
}
479484
}
480485
_ => None,
481486
}

0 commit comments

Comments
 (0)