@@ -40,6 +40,7 @@ use crate::llvm::debuginfo::{
40
40
use crate :: value:: Value ;
41
41
42
42
mod create_scope_map;
43
+ mod di_builder;
43
44
mod dwarf_const;
44
45
mod gdb;
45
46
pub ( crate ) mod metadata;
@@ -325,9 +326,9 @@ impl<'ll, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
325
326
let loc = self . lookup_debug_loc ( span. lo ( ) ) ;
326
327
let file_metadata = file_metadata ( self , & loc. file ) ;
327
328
328
- let function_type_metadata = unsafe {
329
+ let function_type_metadata = {
329
330
let fn_signature = get_function_signature ( self , fn_abi) ;
330
- llvm :: LLVMRustDIBuilderCreateSubroutineType ( DIB ( self ) , fn_signature )
331
+ DIB ( self ) . create_subroutine_type ( & fn_signature , DIFlags :: FlagZero )
331
332
} ;
332
333
333
334
let mut name = String :: with_capacity ( 64 ) ;
@@ -420,9 +421,9 @@ impl<'ll, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
420
421
fn get_function_signature < ' ll , ' tcx > (
421
422
cx : & CodegenCx < ' ll , ' tcx > ,
422
423
fn_abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
423
- ) -> & ' ll DIArray {
424
+ ) -> Vec < Option < & ' ll llvm :: Metadata > > {
424
425
if cx. sess ( ) . opts . debuginfo != DebugInfo :: Full {
425
- return create_DIArray ( DIB ( cx ) , & [ ] ) ;
426
+ return vec ! [ ] ;
426
427
}
427
428
428
429
let mut signature = Vec :: with_capacity ( fn_abi. args . len ( ) + 1 ) ;
@@ -463,7 +464,7 @@ impl<'ll, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> {
463
464
. extend ( fn_abi. args . iter ( ) . map ( |arg| Some ( type_di_node ( cx, arg. layout . ty ) ) ) ) ;
464
465
}
465
466
466
- create_DIArray ( DIB ( cx ) , & signature[ .. ] )
467
+ signature
467
468
}
468
469
469
470
fn get_template_parameters < ' ll , ' tcx > (
0 commit comments