@@ -359,7 +359,10 @@ fn build_dyn_type_di_node<'ll, 'tcx>(
359
359
NO_GENERICS ,
360
360
)
361
361
} 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
+ )
363
366
}
364
367
}
365
368
@@ -390,15 +393,15 @@ fn build_slice_type_di_node<'ll, 'tcx>(
390
393
ty:: Str => cx. tcx . types . u8 ,
391
394
_ => {
392
395
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." ,
394
397
slice_type
395
398
)
396
399
}
397
400
} ;
398
401
399
- let element_type_metadata = type_di_node ( cx, element_type) ;
402
+ let element_type_di_node = type_di_node ( cx, element_type) ;
400
403
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 }
402
405
}
403
406
404
407
/// 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
445
448
ty:: Tuple ( _) => build_tuple_type_di_node ( cx, unique_type_id) ,
446
449
// Type parameters from polymorphized functions.
447
450
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) ,
449
452
} ;
450
453
451
454
{
@@ -456,7 +459,7 @@ pub fn type_di_node<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> &'ll D
456
459
Some ( di_node) => di_node,
457
460
None => {
458
461
bug ! (
459
- "expected type di_node for unique \
462
+ "expected type debuginfo node for unique \
460
463
type ID '{:?}' to already be in \
461
464
the `debuginfo::TypeMap` but it \
462
465
was not.",
@@ -754,7 +757,7 @@ pub fn build_compile_unit_di_node<'ll, 'tcx>(
754
757
name_in_debuginfo. push ( "@" ) ;
755
758
name_in_debuginfo. push ( codegen_unit_name) ;
756
759
757
- debug ! ( "compile_unit_metadata : {:?}" , name_in_debuginfo) ;
760
+ debug ! ( "build_compile_unit_di_node : {:?}" , name_in_debuginfo) ;
758
761
let rustc_producer =
759
762
format ! ( "rustc version {}" , option_env!( "CFG_VERSION" ) . expect( "CFG_VERSION" ) , ) ;
760
763
// 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) ->
1003
1006
fn build_upvar_field_di_nodes < ' ll , ' tcx > (
1004
1007
cx : & CodegenCx < ' ll , ' tcx > ,
1005
1008
closure_or_generator_ty : Ty < ' tcx > ,
1006
- closure_or_generator_metadata : & ' ll DIType ,
1009
+ closure_or_generator_di_node : & ' ll DIType ,
1007
1010
) -> SmallVec < & ' ll DIType > {
1008
1011
let ( & def_id, up_var_tys) = match closure_or_generator_ty. kind ( ) {
1009
1012
ty:: Generator ( def_id, substs, _) => {
@@ -1016,7 +1019,7 @@ fn build_upvar_field_di_nodes<'ll, 'tcx>(
1016
1019
}
1017
1020
_ => {
1018
1021
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: {:?}" ,
1020
1023
closure_or_generator_ty
1021
1024
)
1022
1025
}
@@ -1038,7 +1041,7 @@ fn build_upvar_field_di_nodes<'ll, 'tcx>(
1038
1041
. map ( |( index, ( up_var_ty, capture_name) ) | {
1039
1042
build_field_di_node (
1040
1043
cx,
1041
- closure_or_generator_metadata ,
1044
+ closure_or_generator_di_node ,
1042
1045
capture_name,
1043
1046
cx. size_and_align_of ( up_var_ty) ,
1044
1047
layout. fields . offset ( index) ,
@@ -1074,14 +1077,14 @@ fn build_tuple_type_di_node<'ll, 'tcx>(
1074
1077
DIFlags :: FlagZero ,
1075
1078
) ,
1076
1079
// Fields:
1077
- |cx, tuple_metadata | {
1080
+ |cx, tuple_di_node | {
1078
1081
component_types
1079
1082
. into_iter ( )
1080
1083
. enumerate ( )
1081
1084
. map ( |( index, component_type) | {
1082
1085
build_field_di_node (
1083
1086
cx,
1084
- tuple_metadata ,
1087
+ tuple_di_node ,
1085
1088
& tuple_field_name ( index) ,
1086
1089
cx. size_and_align_of ( component_type) ,
1087
1090
tuple_type_and_layout. fields . offset ( index) ,
@@ -1095,14 +1098,14 @@ fn build_tuple_type_di_node<'ll, 'tcx>(
1095
1098
)
1096
1099
}
1097
1100
1098
- /// Builds the debufinfo node for a closure environment.
1101
+ /// Builds the debuginfo node for a closure environment.
1099
1102
fn build_closure_env_di_node < ' ll , ' tcx > (
1100
1103
cx : & CodegenCx < ' ll , ' tcx > ,
1101
1104
unique_type_id : UniqueTypeId < ' tcx > ,
1102
1105
) -> DINodeCreationResult < ' ll > {
1103
1106
let closure_env_type = unique_type_id. expect_ty ( ) ;
1104
1107
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)
1106
1109
} ;
1107
1110
let containing_scope = get_namespace_for_item ( cx, def_id) ;
1108
1111
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>(
1225
1228
if let GenericArgKind :: Type ( ty) = kind. unpack ( ) {
1226
1229
let actual_type =
1227
1230
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) ;
1229
1232
let name = name. as_str ( ) ;
1230
1233
Some ( unsafe {
1231
1234
llvm:: LLVMRustDIBuilderCreateTemplateTypeParameter (
1232
1235
DIB ( cx) ,
1233
1236
None ,
1234
1237
name. as_ptr ( ) . cast ( ) ,
1235
1238
name. len ( ) ,
1236
- actual_type_metadata ,
1239
+ actual_type_di_node ,
1237
1240
)
1238
1241
} )
1239
1242
} else {
0 commit comments