Skip to content

[5.3] IRGen: Fix asserting local extern declarations. #33881

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

Conversation

aschwaighofer
Copy link
Contributor

Explanation:
LLVM currently asserts on local extern variables in C headers passed to
Swift when the definition exists outside that header.

Scope: This never worked.

Risk: Low.

Testing: Regression test added.

Reviewed-by: John McCall

Original PR: #33306

rdar://67951491

@aschwaighofer aschwaighofer requested a review from a team as a code owner September 9, 2020 22:42
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@aschwaighofer
Copy link
Contributor Author

@swift-ci please nominate

@swift-ci
Copy link
Contributor

swift-ci commented Sep 9, 2020

Build failed
Swift Test Linux Platform
Git Sha - 138e3dbc875d4d2a21e3085888de0105f59eb278

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 138e3dbc875d4d2a21e3085888de0105f59eb278

@3405691582
Copy link
Member

3405691582 commented Sep 10, 2020

It may be worthwhile to pick the commits from #33816 and #33827 as well.

I'm not quite sure why the tests are failing in this context, however.

gribozavr and others added 3 commits September 10, 2020 07:28
Bug fix: Emit code for C++ inline function called from another inline function
…ang-decl

[IRGen] Check as early as possible for Clang decls we've seen before.
Explanation:
LLVM currently asserts on local extern variables in C headers passed to
Swift when the definition exists outside that header.

Scope: This never worked.

Risk: Low.

Testing: Regression test added.

Reviewed-by: John McCall

Original PR: swiftlang#33306

This fix also required the cherry-pick of: swiftlang#31035 and swiftlang#31272

rdar://67951491
@aschwaighofer
Copy link
Contributor Author

This PR includes #33816 and #33827

But I also need to include #31272 and #31035 for the tests to pass.

@aschwaighofer aschwaighofer force-pushed the irgen_fix_asserting_local_extern_5.3 branch from 138e3db to 4a4796a Compare September 10, 2020 14:51
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test windows

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 138e3dbc875d4d2a21e3085888de0105f59eb278

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 138e3dbc875d4d2a21e3085888de0105f59eb278

@aschwaighofer aschwaighofer merged commit ac2b7c2 into swiftlang:release/5.3 Sep 11, 2020
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks and removed r5.3 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants