Skip to content

Mark main() as used #33197

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
Jul 31, 2020
Merged

Mark main() as used #33197

merged 1 commit into from
Jul 31, 2020

Conversation

beccadax
Copy link
Contributor

@beccadax beccadax commented Jul 30, 2020

This prevents dead code stripping from removing the main() function used in widgets. This special case was added to support the integrated REPL, which was removed after Swift 5.3, and so it is no longer necessary.

This is basically just #33177, but with the special case for IRGenOptions::IntegratedREPL removed because the integrated REPL is dead as a doornail in master.

Fixes rdar://65862827.

This prevents dead code stripping from removing the main() function used in widgets. This special case was added to support the integrated REPL, which was removed after Swift 5.3, and so it is no longer necessary.

Fixes rdar://65862827.
@beccadax
Copy link
Contributor Author

@swift-ci please test

@beccadax beccadax requested a review from CodaFi July 30, 2020 03:54
@CodaFi
Copy link
Contributor

CodaFi commented Jul 30, 2020

@lhames Does ORC still manipulate the llvm.used module flag like this?

@lhames
Copy link
Contributor

lhames commented Jul 31, 2020

ORC does not manipulate llvm.used, but ORC is only used in immediate mode at the moment, not in the REPL.

@beccadax beccadax merged commit 1420a38 into swiftlang:master Jul 31, 2020
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.

3 participants