@@ -27,9 +27,7 @@ use self::type_map::{DINodeCreationResult, Stub, UniqueTypeId};
2727use super :: CodegenUnitDebugContext ;
2828use super :: namespace:: mangled_name_of_instance;
2929use super :: type_names:: { compute_debuginfo_type_name, compute_debuginfo_vtable_name} ;
30- use super :: utils:: {
31- DIB , create_DIArray, debug_context, get_namespace_for_item, is_node_local_to_unit,
32- } ;
30+ use super :: utils:: { DIB , debug_context, get_namespace_for_item, is_node_local_to_unit} ;
3331use crate :: common:: { AsCCharPtr , CodegenCx } ;
3432use crate :: debuginfo:: dwarf_const;
3533use crate :: debuginfo:: metadata:: type_map:: build_type_with_children;
@@ -112,19 +110,9 @@ fn build_fixed_size_array_di_node<'ll, 'tcx>(
112110 . try_to_target_usize ( cx. tcx )
113111 . expect ( "expected monomorphic const in codegen" ) as c_longlong ;
114112
115- let subrange =
116- unsafe { Some ( llvm:: LLVMRustDIBuilderGetOrCreateSubrange ( DIB ( cx) , 0 , upper_bound) ) } ;
113+ let subrange = unsafe { llvm:: LLVMRustDIBuilderGetOrCreateSubrange ( DIB ( cx) , 0 , upper_bound) } ;
117114
118- let subscripts = create_DIArray ( DIB ( cx) , & [ subrange] ) ;
119- let di_node = unsafe {
120- llvm:: LLVMRustDIBuilderCreateArrayType (
121- DIB ( cx) ,
122- size. bits ( ) ,
123- align. bits ( ) as u32 ,
124- element_type_di_node,
125- subscripts,
126- )
127- } ;
115+ let di_node = DIB ( cx) . create_array_type ( size, align, element_type_di_node, & [ subrange] ) ;
128116
129117 DINodeCreationResult :: new ( di_node, false )
130118}
0 commit comments