1
Fork 0

Introduce DIBuilderBox, an owning pointer to DIBuilder

This commit is contained in:
Zalathar 2025-01-31 16:29:09 +11:00
parent 854f22563c
commit 832fcfb64f
4 changed files with 53 additions and 20 deletions

View file

@ -41,7 +41,7 @@ pub(crate) fn debug_context<'a, 'll, 'tcx>(
#[inline]
#[allow(non_snake_case)]
pub(crate) fn DIB<'a, 'll>(cx: &'a CodegenCx<'ll, '_>) -> &'a DIBuilder<'ll> {
cx.dbg_cx.as_ref().unwrap().builder
cx.dbg_cx.as_ref().unwrap().builder.as_ref()
}
pub(crate) fn get_namespace_for_item<'ll>(cx: &CodegenCx<'ll, '_>, def_id: DefId) -> &'ll DIScope {