@@ -998,12 +998,12 @@ fn build_field_di_node<'ll, 'tcx>(
998998 type_di_node : & ' ll DIType ,
999999 def_id : Option < DefId > ,
10001000) -> & ' ll DIType {
1001- let ( file_metadata, line_number) =
1002- if cx . sess ( ) . opts . unstable_opts . more_source_locations_in_debuginfo {
1003- file_metadata_from_def_id ( cx, def_id)
1004- } else {
1005- ( unknown_file_metadata ( cx) , UNKNOWN_LINE_NUMBER )
1006- } ;
1001+ let ( file_metadata, line_number) = if cx . sess ( ) . opts . unstable_opts . debug_info_type_line_numbers
1002+ {
1003+ file_metadata_from_def_id ( cx, def_id)
1004+ } else {
1005+ ( unknown_file_metadata ( cx) , UNKNOWN_LINE_NUMBER )
1006+ } ;
10071007 unsafe {
10081008 llvm:: LLVMRustDIBuilderCreateMemberType (
10091009 DIB ( cx) ,
@@ -1055,7 +1055,7 @@ fn build_struct_type_di_node<'ll, 'tcx>(
10551055 let containing_scope = get_namespace_for_item ( cx, adt_def. did ( ) ) ;
10561056 let struct_type_and_layout = cx. layout_of ( struct_type) ;
10571057 let variant_def = adt_def. non_enum_variant ( ) ;
1058- let def_location = if cx. sess ( ) . opts . unstable_opts . more_source_locations_in_debuginfo {
1058+ let def_location = if cx. sess ( ) . opts . unstable_opts . debug_info_type_line_numbers {
10591059 Some ( file_metadata_from_def_id ( cx, Some ( adt_def. did ( ) ) ) )
10601060 } else {
10611061 None
@@ -1088,8 +1088,7 @@ fn build_struct_type_di_node<'ll, 'tcx>(
10881088 Cow :: Borrowed ( f. name . as_str ( ) )
10891089 } ;
10901090 let field_layout = struct_type_and_layout. field ( cx, i) ;
1091- let def_id = if cx. sess ( ) . opts . unstable_opts . more_source_locations_in_debuginfo
1092- {
1091+ let def_id = if cx. sess ( ) . opts . unstable_opts . debug_info_type_line_numbers {
10931092 Some ( f. did )
10941093 } else {
10951094 None
@@ -1221,7 +1220,7 @@ fn build_closure_env_di_node<'ll, 'tcx>(
12211220 let containing_scope = get_namespace_for_item ( cx, def_id) ;
12221221 let type_name = compute_debuginfo_type_name ( cx. tcx , closure_env_type, false ) ;
12231222
1224- let def_location = if cx. sess ( ) . opts . unstable_opts . more_source_locations_in_debuginfo {
1223+ let def_location = if cx. sess ( ) . opts . unstable_opts . debug_info_type_line_numbers {
12251224 Some ( file_metadata_from_def_id ( cx, Some ( def_id) ) )
12261225 } else {
12271226 None
@@ -1258,7 +1257,7 @@ fn build_union_type_di_node<'ll, 'tcx>(
12581257 let containing_scope = get_namespace_for_item ( cx, union_def_id) ;
12591258 let union_ty_and_layout = cx. layout_of ( union_type) ;
12601259 let type_name = compute_debuginfo_type_name ( cx. tcx , union_type, false ) ;
1261- let def_location = if cx. sess ( ) . opts . unstable_opts . more_source_locations_in_debuginfo {
1260+ let def_location = if cx. sess ( ) . opts . unstable_opts . debug_info_type_line_numbers {
12621261 Some ( file_metadata_from_def_id ( cx, Some ( union_def_id) ) )
12631262 } else {
12641263 None
@@ -1284,8 +1283,7 @@ fn build_union_type_di_node<'ll, 'tcx>(
12841283 . enumerate ( )
12851284 . map ( |( i, f) | {
12861285 let field_layout = union_ty_and_layout. field ( cx, i) ;
1287- let def_id = if cx. sess ( ) . opts . unstable_opts . more_source_locations_in_debuginfo
1288- {
1286+ let def_id = if cx. sess ( ) . opts . unstable_opts . debug_info_type_line_numbers {
12891287 Some ( f. did )
12901288 } else {
12911289 None
0 commit comments