@@ -68,7 +68,6 @@ pub const UNKNOWN_LINE_NUMBER: c_uint = 0;
6868pub const UNKNOWN_COLUMN_NUMBER : c_uint = 0 ;
6969
7070// ptr::null() doesn't work :(
71- pub const NO_FILE_METADATA : DIFile = ( 0 as DIFile ) ;
7271pub const NO_SCOPE_METADATA : DIScope = ( 0 as DIScope ) ;
7372
7473const FLAGS_NONE : c_uint = 0 ;
@@ -616,7 +615,7 @@ fn subroutine_type_metadata<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
616615 unsafe {
617616 llvm:: LLVMDIBuilderCreateSubroutineType (
618617 DIB ( cx) ,
619- NO_FILE_METADATA ,
618+ unknown_file_metadata ( cx ) ,
620619 create_DIArray ( DIB ( cx) , & signature_metadata[ ..] ) )
621620 } ,
622621 false ) ;
@@ -653,14 +652,15 @@ fn trait_pointer_metadata<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
653652 let ( containing_scope, _) = get_namespace_and_span_for_item ( cx, def_id) ;
654653
655654 let trait_llvm_type = type_of:: type_of ( cx, trait_object_type) ;
655+ let file_metadata = unknown_file_metadata ( cx) ;
656656
657657 composite_type_metadata ( cx,
658658 trait_llvm_type,
659659 & trait_type_name[ ..] ,
660660 unique_type_id,
661661 & [ ] ,
662662 containing_scope,
663- NO_FILE_METADATA ,
663+ file_metadata ,
664664 syntax_pos:: DUMMY_SP )
665665}
666666
@@ -1628,7 +1628,7 @@ fn prepare_enum_metadata<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
16281628 DIB ( cx) ,
16291629 containing_scope,
16301630 name. as_ptr ( ) ,
1631- NO_FILE_METADATA ,
1631+ file_metadata ,
16321632 UNKNOWN_LINE_NUMBER ,
16331633 bytes_to_bits ( discriminant_size) ,
16341634 bytes_to_bits ( discriminant_align) ,
@@ -1774,7 +1774,7 @@ fn set_members_of_composite_type(cx: &CrateContext,
17741774 DIB ( cx) ,
17751775 composite_type_metadata,
17761776 member_name. as_ptr ( ) ,
1777- NO_FILE_METADATA ,
1777+ unknown_file_metadata ( cx ) ,
17781778 UNKNOWN_LINE_NUMBER ,
17791779 bytes_to_bits ( member_size) ,
17801780 bytes_to_bits ( member_align) ,
@@ -1817,7 +1817,7 @@ fn create_struct_stub(cx: &CrateContext,
18171817 DIB ( cx) ,
18181818 containing_scope,
18191819 name. as_ptr ( ) ,
1820- NO_FILE_METADATA ,
1820+ unknown_file_metadata ( cx ) ,
18211821 UNKNOWN_LINE_NUMBER ,
18221822 bytes_to_bits ( struct_size) ,
18231823 bytes_to_bits ( struct_align) ,
@@ -1857,7 +1857,7 @@ pub fn create_global_var_metadata(cx: &CrateContext,
18571857 let loc = span_start ( cx, span) ;
18581858 ( file_metadata ( cx, & loc. file . name , & loc. file . abs_path ) , loc. line as c_uint )
18591859 } else {
1860- ( NO_FILE_METADATA , UNKNOWN_LINE_NUMBER )
1860+ ( unknown_file_metadata ( cx ) , UNKNOWN_LINE_NUMBER )
18611861 } ;
18621862
18631863 let is_local_to_unit = is_node_local_to_unit ( cx, node_id) ;
0 commit comments