@@ -32,9 +32,7 @@ use self::type_map::{DINodeCreationResult, Stub, UniqueTypeId};
3232use super :: CodegenUnitDebugContext ;
3333use super :: namespace:: mangled_name_of_instance;
3434use super :: type_names:: { compute_debuginfo_type_name, compute_debuginfo_vtable_name} ;
35- use super :: utils:: {
36- DIB , create_DIArray, debug_context, get_namespace_for_item, is_node_local_to_unit,
37- } ;
35+ use super :: utils:: { DIB , debug_context, get_namespace_for_item, is_node_local_to_unit} ;
3836use crate :: common:: { AsCCharPtr , CodegenCx } ;
3937use crate :: debuginfo:: dwarf_const;
4038use crate :: debuginfo:: metadata:: type_map:: build_type_with_children;
@@ -119,17 +117,17 @@ fn build_fixed_size_array_di_node<'ll, 'tcx>(
119117 . try_to_target_usize ( cx. tcx )
120118 . expect ( "expected monomorphic const in codegen" ) as c_longlong ;
121119
122- let subrange =
123- unsafe { Some ( llvm :: LLVMRustDIBuilderGetOrCreateSubrange ( DIB ( cx ) , 0 , upper_bound ) ) } ;
120+ let subrange = unsafe { llvm :: LLVMRustDIBuilderGetOrCreateSubrange ( DIB ( cx ) , 0 , upper_bound ) } ;
121+ let subscripts = & [ subrange ] ;
124122
125- let subscripts = create_DIArray ( DIB ( cx) , & [ subrange] ) ;
126123 let di_node = unsafe {
127- llvm:: LLVMRustDIBuilderCreateArrayType (
124+ llvm:: LLVMDIBuilderCreateArrayType (
128125 DIB ( cx) ,
129126 size. bits ( ) ,
130127 align. bits ( ) as u32 ,
131128 element_type_di_node,
132- subscripts,
129+ subscripts. as_ptr ( ) ,
130+ subscripts. len ( ) as c_uint ,
133131 )
134132 } ;
135133
0 commit comments