Skip to content

Commit 226bc92

Browse files
partitioning: Fix visibility of internalized symbols.
1 parent 678d377 commit 226bc92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_trans/partitioning.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ fn internalize_symbols<'a, 'tcx>(_tcx: TyCtxt<'a, 'tcx, 'tcx>,
576576
cgu_name: cgu.name.clone()
577577
};
578578

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

600600
// If we got here, we did not find any accesses from other CGUs,
601601
// so it's fine to make this translation item internal.
602-
*linkage = llvm::InternalLinkage;
602+
*linkage_and_visibility = (llvm::InternalLinkage, llvm::Visibility::Default);
603603
}
604604
}
605605
}

0 commit comments

Comments
 (0)