Skip to content

Conversation

@slavapestov
Copy link
Contributor

Previously we gave them the same SIL linkage as the method, then changed
the LLVM IR linkage to 'internal' (which is roughly equivalent to
SIL 'private') in IRGen.

This would crash in the SIL verifier if an @objc method was
'@_alwaysEmitIntoClient'. While such a combination of attributes is
silly since '@objc' methods are intrinsically part of the ABI, we
should not crash in this case.

The simplest fix is to just set the linkage to private at the SIL
level, avoiding the IRGen hack entirely.

Previously we gave them the same SIL linkage as the method, then changed
the LLVM IR linkage to 'internal' (which is roughly equivalent to
SIL 'private') in IRGen.

This would crash in the SIL verifier if an @objc method was
'@_alwaysEmitIntoClient'. While such a combination of attributes is
silly since '@objc' methods are intrinsically part of the ABI, we
should not crash in this case.

The simplest fix is to just set the linkage to private at the SIL
level, avoiding the IRGen hack entirely.
@slavapestov slavapestov requested a review from jckarter June 7, 2022 05:17
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit 831be7f into swiftlang:main Jun 7, 2022
ahoppen added a commit to ahoppen/swift that referenced this pull request Jun 8, 2022
…k-linkage"

This reverts commit 831be7f, reversing
changes made to 8b77860.
slavapestov added a commit to slavapestov/swift that referenced this pull request Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant