@@ -133,7 +133,7 @@ use symbol_map::SymbolMap;
133
133
use syntax:: ast:: NodeId ;
134
134
use syntax:: parse:: token:: { self , InternedString } ;
135
135
use trans_item:: TransItem ;
136
- use util:: nodemap:: { FnvHashMap , FnvHashSet , NodeSet } ;
136
+ use util:: nodemap:: { FnvHashMap , FnvHashSet } ;
137
137
138
138
pub enum PartitioningStrategy {
139
139
/// Generate one codegen unit per source-level module.
@@ -254,8 +254,7 @@ const FALLBACK_CODEGEN_UNIT: &'static str = "__rustc_fallback_codegen_unit";
254
254
pub fn partition < ' a , ' tcx , I > ( scx : & SharedCrateContext < ' a , ' tcx > ,
255
255
trans_items : I ,
256
256
strategy : PartitioningStrategy ,
257
- inlining_map : & InliningMap < ' tcx > ,
258
- reachable : & NodeSet )
257
+ inlining_map : & InliningMap < ' tcx > )
259
258
-> Vec < CodegenUnit < ' tcx > >
260
259
where I : Iterator < Item = TransItem < ' tcx > >
261
260
{
@@ -265,8 +264,7 @@ pub fn partition<'a, 'tcx, I>(scx: &SharedCrateContext<'a, 'tcx>,
265
264
// respective 'home' codegen unit. Regular translation items are all
266
265
// functions and statics defined in the local crate.
267
266
let mut initial_partitioning = place_root_translation_items ( scx,
268
- trans_items,
269
- reachable) ;
267
+ trans_items) ;
270
268
271
269
debug_dump ( tcx, "INITIAL PARTITONING:" , initial_partitioning. codegen_units . iter ( ) ) ;
272
270
@@ -304,8 +302,7 @@ struct PreInliningPartitioning<'tcx> {
304
302
struct PostInliningPartitioning < ' tcx > ( Vec < CodegenUnit < ' tcx > > ) ;
305
303
306
304
fn place_root_translation_items < ' a , ' tcx , I > ( scx : & SharedCrateContext < ' a , ' tcx > ,
307
- trans_items : I ,
308
- _reachable : & NodeSet )
305
+ trans_items : I )
309
306
-> PreInliningPartitioning < ' tcx >
310
307
where I : Iterator < Item = TransItem < ' tcx > >
311
308
{
@@ -344,6 +341,10 @@ fn place_root_translation_items<'a, 'tcx, I>(scx: &SharedCrateContext<'a, 'tcx>,
344
341
// This is a non-generic functions, we always
345
342
// make it visible externally on the chance that
346
343
// 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).
347
348
llvm:: ExternalLinkage
348
349
} else {
349
350
// In the current setup, generic functions cannot
0 commit comments