Skip to content

Conversation

@DougGregor
Copy link
Member

Rather than treating @_extern(c) functions like a Swift function with a C calling convention, treat them as foreign entrypoints, which better matches how we handle imported C functions.

Rather than treating `@_extern(c)` functions like a Swift function with
a C calling convention, treat them as foreign entrypoints, which
better matches how we handle imported C functions.
@DougGregor DougGregor requested a review from jckarter as a code owner October 17, 2025 02:06
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor DougGregor enabled auto-merge October 17, 2025 02:06
@DougGregor DougGregor disabled auto-merge October 17, 2025 02:06
This ensures that when we reference them, we get an appropriately-typed
function value. SILGen can then thunk to whatever function type is
needed.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please smoke test Windows

@DougGregor
Copy link
Member Author

@swift-ci clean smoke test macOS

@DougGregor DougGregor enabled auto-merge October 17, 2025 18:18
@DougGregor DougGregor merged commit d243b8d into swiftlang:main Oct 17, 2025
3 checks passed
@DougGregor DougGregor deleted the extern-c-foreign branch October 17, 2025 18:57
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