@@ -998,12 +998,12 @@ fn build_field_di_node<'ll, 'tcx>(
998
998
type_di_node : & ' ll DIType ,
999
999
def_id : Option < DefId > ,
1000
1000
) -> & ' 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
+ } ;
1007
1007
unsafe {
1008
1008
llvm:: LLVMRustDIBuilderCreateMemberType (
1009
1009
DIB ( cx) ,
@@ -1055,7 +1055,7 @@ fn build_struct_type_di_node<'ll, 'tcx>(
1055
1055
let containing_scope = get_namespace_for_item ( cx, adt_def. did ( ) ) ;
1056
1056
let struct_type_and_layout = cx. layout_of ( struct_type) ;
1057
1057
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 {
1059
1059
Some ( file_metadata_from_def_id ( cx, Some ( adt_def. did ( ) ) ) )
1060
1060
} else {
1061
1061
None
@@ -1088,8 +1088,7 @@ fn build_struct_type_di_node<'ll, 'tcx>(
1088
1088
Cow :: Borrowed ( f. name . as_str ( ) )
1089
1089
} ;
1090
1090
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 {
1093
1092
Some ( f. did )
1094
1093
} else {
1095
1094
None
@@ -1221,7 +1220,7 @@ fn build_closure_env_di_node<'ll, 'tcx>(
1221
1220
let containing_scope = get_namespace_for_item ( cx, def_id) ;
1222
1221
let type_name = compute_debuginfo_type_name ( cx. tcx , closure_env_type, false ) ;
1223
1222
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 {
1225
1224
Some ( file_metadata_from_def_id ( cx, Some ( def_id) ) )
1226
1225
} else {
1227
1226
None
@@ -1258,7 +1257,7 @@ fn build_union_type_di_node<'ll, 'tcx>(
1258
1257
let containing_scope = get_namespace_for_item ( cx, union_def_id) ;
1259
1258
let union_ty_and_layout = cx. layout_of ( union_type) ;
1260
1259
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 {
1262
1261
Some ( file_metadata_from_def_id ( cx, Some ( union_def_id) ) )
1263
1262
} else {
1264
1263
None
@@ -1284,8 +1283,7 @@ fn build_union_type_di_node<'ll, 'tcx>(
1284
1283
. enumerate ( )
1285
1284
. map ( |( i, f) | {
1286
1285
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 {
1289
1287
Some ( f. did )
1290
1288
} else {
1291
1289
None
0 commit comments