Skip to content

Remove a hack to change linkage from public_external to shared. #9736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions lib/SILOptimizer/Transforms/SILCleanup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ static void cleanFunction(SILFunction &Fn) {
}
}
}

// Rename functions with public_external linkage to prevent symbol conflict
// with stdlib.
if (Fn.isDefinition() && Fn.getLinkage() == SILLinkage::PublicExternal) {
Fn.setLinkage(SILLinkage::SharedExternal);
}
}

namespace {
Expand Down
4 changes: 2 additions & 2 deletions test/IRGen/sil_linkage.sil
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ sil_stage canonical
// CHECK: define{{( protected)?}} swiftcc void @hidden_fragile_function_test() {{.*}} {
// CHECK: define linkonce_odr hidden swiftcc void @shared_fragile_function_test() {{.*}} {
// CHECK: define{{( protected)?}} swiftcc void @private_fragile_function_test() {{.*}} {
// CHECK: define linkonce_odr hidden swiftcc void @public_external_fragile_function_def_test() {{.*}} {
// CHECK: define available_externally swiftcc void @public_external_fragile_function_def_test() {{.*}} {
// CHECK: define{{( protected)?}} available_externally swiftcc void @hidden_external_fragile_function_def_test() {{.*}} {
// CHECK: define linkonce_odr hidden swiftcc void @shared_external_fragile_function_def_test() {{.*}} {
// CHECK: define{{( protected)?}} available_externally swiftcc void @private_external_fragile_function_def_test() {{.*}} {
// CHECK: define{{( protected)?}} swiftcc void @public_resilient_function_test() {{.*}} {
// CHECK: define hidden swiftcc void @hidden_resilient_function_test() {{.*}} {
// CHECK: define linkonce_odr hidden swiftcc void @shared_resilient_function_test() {{.*}} {
// CHECK: define internal swiftcc void @private_resilient_function_test() {{.*}}{
// CHECK: define linkonce_odr hidden swiftcc void @public_external_resilient_function_def_test() {{.*}} {
// CHECK: define available_externally swiftcc void @public_external_resilient_function_def_test() {{.*}} {
// CHECK: define{{( protected)?}} available_externally hidden swiftcc void @hidden_external_resilient_function_def_test() {{.*}} {
// CHECK: define linkonce_odr hidden swiftcc void @shared_external_resilient_function_def_test() {{.*}} {

Expand Down