Skip to content

[cxx-interop][IRGen] Assign Clang function types to copy constructors #72770

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
Apr 4, 2024

Conversation

egorzhdan
Copy link
Contributor

@egorzhdan egorzhdan commented Apr 2, 2024

This fixes an assertion failure when building certain projects for arm64e with -use-clang-function-types Swift compiler flag:

Expected non-null Clang type for @convention(c)/@convention(block) function but found nullptr

rdar://121227452

@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Apr 2, 2024
@egorzhdan egorzhdan requested review from hyp and zoecarver April 2, 2024 17:09
@egorzhdan
Copy link
Contributor Author

Not sure about the right way to test this, let me think for a bit

@egorzhdan
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@hyp hyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any tests tho?

@egorzhdan egorzhdan force-pushed the egorzhdan/clang-fn-type-copy-ctor branch from b716967 to 4bb7a0c Compare April 3, 2024 12:25
@egorzhdan
Copy link
Contributor Author

@swift-ci please test

This fixes an assertion failure when building certain projects for arm64e with `-use-clang-function-types` Swift compiler flag:
```
Expected non-null Clang type for @convention(c)/@convention(block) function but found nullptr
```

rdar://121227452
@egorzhdan egorzhdan force-pushed the egorzhdan/clang-fn-type-copy-ctor branch from 4bb7a0c to 802f20e Compare April 3, 2024 18:26
@egorzhdan
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thank you

@egorzhdan egorzhdan merged commit a81259e into main Apr 4, 2024
@egorzhdan egorzhdan deleted the egorzhdan/clang-fn-type-copy-ctor branch April 4, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants