@@ -359,7 +359,10 @@ fn build_dyn_type_di_node<'ll, 'tcx>(
359359 NO_GENERICS ,
360360 )
361361 } else {
362- bug ! ( "Only ty::Dynamic is valid for dyn_type_metadata(). Found {:?} instead." , dyn_type)
362+ bug ! (
363+ "Only ty::Dynamic is valid for build_dyn_type_di_node(). Found {:?} instead." ,
364+ dyn_type
365+ )
363366 }
364367}
365368
@@ -390,15 +393,15 @@ fn build_slice_type_di_node<'ll, 'tcx>(
390393 ty:: Str => cx. tcx . types . u8 ,
391394 _ => {
392395 bug ! (
393- "Only ty::Slice is valid for slice_type_metadata (). Found {:?} instead." ,
396+ "Only ty::Slice is valid for build_slice_type_di_node (). Found {:?} instead." ,
394397 slice_type
395398 )
396399 }
397400 } ;
398401
399- let element_type_metadata = type_di_node ( cx, element_type) ;
402+ let element_type_di_node = type_di_node ( cx, element_type) ;
400403 return_if_di_node_created_in_meantime ! ( cx, unique_type_id) ;
401- DINodeCreationResult { di_node : element_type_metadata , already_stored_in_typemap : false }
404+ DINodeCreationResult { di_node : element_type_di_node , already_stored_in_typemap : false }
402405}
403406
404407/// Get the debuginfo node for the given type.
@@ -445,7 +448,7 @@ pub fn type_di_node<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> &'ll D
445448 ty:: Tuple ( _) => build_tuple_type_di_node ( cx, unique_type_id) ,
446449 // Type parameters from polymorphized functions.
447450 ty:: Param ( _) => build_param_type_di_node ( cx, t) ,
448- _ => bug ! ( "debuginfo: unexpected type in type_metadata : {:?}" , t) ,
451+ _ => bug ! ( "debuginfo: unexpected type in type_di_node() : {:?}" , t) ,
449452 } ;
450453
451454 {
@@ -456,7 +459,7 @@ pub fn type_di_node<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> &'ll D
456459 Some ( di_node) => di_node,
457460 None => {
458461 bug ! (
459- "expected type di_node for unique \
462+ "expected type debuginfo node for unique \
460463 type ID '{:?}' to already be in \
461464 the `debuginfo::TypeMap` but it \
462465 was not.",
@@ -754,7 +757,7 @@ pub fn build_compile_unit_di_node<'ll, 'tcx>(
754757 name_in_debuginfo. push ( "@" ) ;
755758 name_in_debuginfo. push ( codegen_unit_name) ;
756759
757- debug ! ( "compile_unit_metadata : {:?}" , name_in_debuginfo) ;
760+ debug ! ( "build_compile_unit_di_node : {:?}" , name_in_debuginfo) ;
758761 let rustc_producer =
759762 format ! ( "rustc version {}" , option_env!( "CFG_VERSION" ) . expect( "CFG_VERSION" ) , ) ;
760763 // FIXME(#41252) Remove "clang LLVM" if we can get GDB and LLVM to play nice.
@@ -1003,7 +1006,7 @@ fn closure_saved_names_of_captured_variables(tcx: TyCtxt<'_>, def_id: DefId) ->
10031006fn build_upvar_field_di_nodes < ' ll , ' tcx > (
10041007 cx : & CodegenCx < ' ll , ' tcx > ,
10051008 closure_or_generator_ty : Ty < ' tcx > ,
1006- closure_or_generator_metadata : & ' ll DIType ,
1009+ closure_or_generator_di_node : & ' ll DIType ,
10071010) -> SmallVec < & ' ll DIType > {
10081011 let ( & def_id, up_var_tys) = match closure_or_generator_ty. kind ( ) {
10091012 ty:: Generator ( def_id, substs, _) => {
@@ -1016,7 +1019,7 @@ fn build_upvar_field_di_nodes<'ll, 'tcx>(
10161019 }
10171020 _ => {
10181021 bug ! (
1019- "new_upvar_member_descriptions () called with non-closure-or-generator-type: {:?}" ,
1022+ "build_upvar_field_di_nodes () called with non-closure-or-generator-type: {:?}" ,
10201023 closure_or_generator_ty
10211024 )
10221025 }
@@ -1038,7 +1041,7 @@ fn build_upvar_field_di_nodes<'ll, 'tcx>(
10381041 . map ( |( index, ( up_var_ty, capture_name) ) | {
10391042 build_field_di_node (
10401043 cx,
1041- closure_or_generator_metadata ,
1044+ closure_or_generator_di_node ,
10421045 capture_name,
10431046 cx. size_and_align_of ( up_var_ty) ,
10441047 layout. fields . offset ( index) ,
@@ -1074,14 +1077,14 @@ fn build_tuple_type_di_node<'ll, 'tcx>(
10741077 DIFlags :: FlagZero ,
10751078 ) ,
10761079 // Fields:
1077- |cx, tuple_metadata | {
1080+ |cx, tuple_di_node | {
10781081 component_types
10791082 . into_iter ( )
10801083 . enumerate ( )
10811084 . map ( |( index, component_type) | {
10821085 build_field_di_node (
10831086 cx,
1084- tuple_metadata ,
1087+ tuple_di_node ,
10851088 & tuple_field_name ( index) ,
10861089 cx. size_and_align_of ( component_type) ,
10871090 tuple_type_and_layout. fields . offset ( index) ,
@@ -1095,14 +1098,14 @@ fn build_tuple_type_di_node<'ll, 'tcx>(
10951098 )
10961099}
10971100
1098- /// Builds the debufinfo node for a closure environment.
1101+ /// Builds the debuginfo node for a closure environment.
10991102fn build_closure_env_di_node < ' ll , ' tcx > (
11001103 cx : & CodegenCx < ' ll , ' tcx > ,
11011104 unique_type_id : UniqueTypeId < ' tcx > ,
11021105) -> DINodeCreationResult < ' ll > {
11031106 let closure_env_type = unique_type_id. expect_ty ( ) ;
11041107 let & ty:: Closure ( def_id, _substs) = closure_env_type. kind ( ) else {
1105- bug ! ( "new_closure_env_metadata () called with non-closure-type: {:?}" , closure_env_type)
1108+ bug ! ( "build_closure_env_di_node () called with non-closure-type: {:?}" , closure_env_type)
11061109 } ;
11071110 let containing_scope = get_namespace_for_item ( cx, def_id) ;
11081111 let type_name = compute_debuginfo_type_name ( cx. tcx , closure_env_type, false ) ;
@@ -1225,15 +1228,15 @@ fn build_generic_type_param_di_nodes<'ll, 'tcx>(
12251228 if let GenericArgKind :: Type ( ty) = kind. unpack ( ) {
12261229 let actual_type =
12271230 cx. tcx . normalize_erasing_regions ( ParamEnv :: reveal_all ( ) , ty) ;
1228- let actual_type_metadata = type_di_node ( cx, actual_type) ;
1231+ let actual_type_di_node = type_di_node ( cx, actual_type) ;
12291232 let name = name. as_str ( ) ;
12301233 Some ( unsafe {
12311234 llvm:: LLVMRustDIBuilderCreateTemplateTypeParameter (
12321235 DIB ( cx) ,
12331236 None ,
12341237 name. as_ptr ( ) . cast ( ) ,
12351238 name. len ( ) ,
1236- actual_type_metadata ,
1239+ actual_type_di_node ,
12371240 )
12381241 } )
12391242 } else {
0 commit comments