@@ -133,7 +133,7 @@ use symbol_map::SymbolMap;
133133use syntax:: ast:: NodeId ;
134134use syntax:: parse:: token:: { self , InternedString } ;
135135use trans_item:: TransItem ;
136- use util:: nodemap:: { FnvHashMap , FnvHashSet , NodeSet } ;
136+ use util:: nodemap:: { FnvHashMap , FnvHashSet } ;
137137
138138pub enum PartitioningStrategy {
139139 /// Generate one codegen unit per source-level module.
@@ -254,8 +254,7 @@ const FALLBACK_CODEGEN_UNIT: &'static str = "__rustc_fallback_codegen_unit";
254254pub fn partition < ' a , ' tcx , I > ( scx : & SharedCrateContext < ' a , ' tcx > ,
255255 trans_items : I ,
256256 strategy : PartitioningStrategy ,
257- inlining_map : & InliningMap < ' tcx > ,
258- reachable : & NodeSet )
257+ inlining_map : & InliningMap < ' tcx > )
259258 -> Vec < CodegenUnit < ' tcx > >
260259 where I : Iterator < Item = TransItem < ' tcx > >
261260{
@@ -265,8 +264,7 @@ pub fn partition<'a, 'tcx, I>(scx: &SharedCrateContext<'a, 'tcx>,
265264 // respective 'home' codegen unit. Regular translation items are all
266265 // functions and statics defined in the local crate.
267266 let mut initial_partitioning = place_root_translation_items ( scx,
268- trans_items,
269- reachable) ;
267+ trans_items) ;
270268
271269 debug_dump ( tcx, "INITIAL PARTITONING:" , initial_partitioning. codegen_units . iter ( ) ) ;
272270
@@ -304,8 +302,7 @@ struct PreInliningPartitioning<'tcx> {
304302struct PostInliningPartitioning < ' tcx > ( Vec < CodegenUnit < ' tcx > > ) ;
305303
306304fn place_root_translation_items < ' a , ' tcx , I > ( scx : & SharedCrateContext < ' a , ' tcx > ,
307- trans_items : I ,
308- _reachable : & NodeSet )
305+ trans_items : I )
309306 -> PreInliningPartitioning < ' tcx >
310307 where I : Iterator < Item = TransItem < ' tcx > >
311308{
@@ -344,6 +341,10 @@ fn place_root_translation_items<'a, 'tcx, I>(scx: &SharedCrateContext<'a, 'tcx>,
344341 // This is a non-generic functions, we always
345342 // make it visible externally on the chance that
346343 // it might be used in another codegen unit.
344+ // Later on base::internalize_symbols() will
345+ // assign "internal" linkage to those symbols
346+ // that are not referenced from other codegen
347+ // units (and are not publicly visible).
347348 llvm:: ExternalLinkage
348349 } else {
349350 // In the current setup, generic functions cannot
0 commit comments