@@ -38,8 +38,8 @@ use crate::debuginfo::metadata::type_map::build_type_with_children;
38
38
use crate :: debuginfo:: utils:: { WidePtrKind , wide_pointer_kind} ;
39
39
use crate :: llvm;
40
40
use crate :: llvm:: debuginfo:: {
41
- DICompositeType , DIDescriptor , DIFile , DIFlags , DILexicalBlock , DIScope , DIType ,
42
- DebugEmissionKind , DebugNameTableKind ,
41
+ DIDescriptor , DIFile , DIFlags , DILexicalBlock , DIScope , DIType , DebugEmissionKind ,
42
+ DebugNameTableKind ,
43
43
} ;
44
44
use crate :: value:: Value ;
45
45
@@ -312,7 +312,12 @@ fn build_subroutine_type_di_node<'ll, 'tcx>(
312
312
313
313
debug_context ( cx) . type_map . unique_id_to_di_node . borrow_mut ( ) . remove ( & unique_type_id) ;
314
314
315
- let fn_di_node = create_subroutine_type ( cx, create_DIArray ( DIB ( cx) , & signature_di_nodes[ ..] ) ) ;
315
+ let fn_di_node = unsafe {
316
+ llvm:: LLVMRustDIBuilderCreateSubroutineType (
317
+ DIB ( cx) ,
318
+ create_DIArray ( DIB ( cx) , & signature_di_nodes[ ..] ) ,
319
+ )
320
+ } ;
316
321
317
322
// This is actually a function pointer, so wrap it in pointer DI.
318
323
let name = compute_debuginfo_type_name ( cx. tcx , fn_ty, false ) ;
@@ -336,13 +341,6 @@ fn build_subroutine_type_di_node<'ll, 'tcx>(
336
341
DINodeCreationResult :: new ( di_node, false )
337
342
}
338
343
339
- pub ( super ) fn create_subroutine_type < ' ll > (
340
- cx : & CodegenCx < ' ll , ' _ > ,
341
- signature : & ' ll DICompositeType ,
342
- ) -> & ' ll DICompositeType {
343
- unsafe { llvm:: LLVMRustDIBuilderCreateSubroutineType ( DIB ( cx) , signature) }
344
- }
345
-
346
344
/// Create debuginfo for `dyn SomeTrait` types. Currently these are empty structs
347
345
/// we with the correct type name (e.g. "dyn SomeTrait<Foo, Item=u32> + Sync").
348
346
fn build_dyn_type_di_node < ' ll , ' tcx > (
0 commit comments