@@ -303,7 +303,6 @@ fn place_root_mono_items<'a, 'tcx, I>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
303
303
{
304
304
let mut roots = FxHashSet ( ) ;
305
305
let mut codegen_units = FxHashMap ( ) ;
306
- let is_incremental_build = tcx. sess . opts . incremental . is_some ( ) ;
307
306
let mut internalization_candidates = FxHashSet ( ) ;
308
307
309
308
// Determine if monomorphizations instantiated in this crate will be made
@@ -323,14 +322,11 @@ fn place_root_mono_items<'a, 'tcx, I>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
323
322
}
324
323
325
324
let characteristic_def_id = characteristic_def_id_of_mono_item ( tcx, mono_item) ;
326
- let is_volatile = is_incremental_build &&
327
- mono_item. is_generic_fn ( ) ;
328
325
329
326
let codegen_unit_name = match characteristic_def_id {
330
327
Some ( def_id) => compute_codegen_unit_name ( tcx,
331
328
cgu_name_builder,
332
329
def_id,
333
- is_volatile,
334
330
cgu_name_cache) ,
335
331
None => fallback_cgu_name ( cgu_name_builder) ,
336
332
} ;
@@ -794,12 +790,11 @@ fn characteristic_def_id_of_mono_item<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
794
790
}
795
791
}
796
792
797
- type CguNameCache = FxHashMap < ( DefId , bool ) , InternedString > ;
793
+ type CguNameCache = FxHashMap < DefId , InternedString > ;
798
794
799
795
fn compute_codegen_unit_name ( tcx : TyCtxt ,
800
796
name_builder : & mut CodegenUnitNameBuilder ,
801
797
def_id : DefId ,
802
- volatile : bool ,
803
798
cache : & mut CguNameCache )
804
799
-> InternedString {
805
800
// Find the innermost module that is not nested within a function
@@ -838,21 +833,16 @@ fn compute_codegen_unit_name(tcx: TyCtxt,
838
833
839
834
let cgu_def_id = cgu_def_id. unwrap ( ) ;
840
835
841
- cache. entry ( ( cgu_def_id, volatile ) ) . or_insert_with ( || {
836
+ cache. entry ( cgu_def_id) . or_insert_with ( || {
842
837
let def_path = tcx. def_path ( cgu_def_id) ;
843
838
844
839
let components = def_path
845
840
. data
846
841
. iter ( )
847
842
. map ( |part| part. data . as_interned_str ( ) ) ;
848
843
849
- let volatile_suffix = if volatile {
850
- Some ( "volatile" )
851
- } else {
852
- None
853
- } ;
854
-
855
- name_builder. build_cgu_name ( def_path. krate , components, volatile_suffix)
844
+ let suffix: Option < & str > = None ;
845
+ name_builder. build_cgu_name ( def_path. krate , components, suffix)
856
846
} ) . clone ( )
857
847
}
858
848
0 commit comments