Skip to content

Commit

Permalink
partitioning: Fix visibility of internalized symbols.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed Jul 17, 2017
1 parent 678d377 commit 226bc92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc_trans/partitioning.rs
Expand Up @@ -576,7 +576,7 @@ fn internalize_symbols<'a, 'tcx>(_tcx: TyCtxt<'a, 'tcx, 'tcx>,
cgu_name: cgu.name.clone()
};

for (accessee, &mut (ref mut linkage, _)) in &mut cgu.items {
for (accessee, linkage_and_visibility) in &mut cgu.items {
if !partitioning.internalization_candidates.contains(accessee) {
// This item is no candidate for internalizing, so skip it.
continue
Expand All @@ -599,7 +599,7 @@ fn internalize_symbols<'a, 'tcx>(_tcx: TyCtxt<'a, 'tcx, 'tcx>,

// If we got here, we did not find any accesses from other CGUs,
// so it's fine to make this translation item internal.
*linkage = llvm::InternalLinkage;
*linkage_and_visibility = (llvm::InternalLinkage, llvm::Visibility::Default);
}
}
}
Expand Down

0 comments on commit 226bc92

Please sign in to comment.