Skip to content

IRGen: Deal with broken AST from batch mode #29926

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

rdar://59552858

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 695fc1cc66f0d4c4a109944ba57070f383e4cc24

Copy link
Contributor

@slavapestov slavapestov left a comment

Choose a reason for hiding this comment

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

A better fix might be to change IRGen's type lowering to accept ErrorType and produce a zero-sized or uninhabited type or something.

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 695fc1cc66f0d4c4a109944ba57070f383e4cc24

@aschwaighofer
Copy link
Contributor Author

@swift-ci please clean test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 695fc1cc66f0d4c4a109944ba57070f383e4cc24

@slavapestov
Copy link
Contributor

slavapestov commented Feb 19, 2020

Yeah, looking at this again I suggest sinking the fix down into the type lowering code. Otherwise you'll hit a similar crash when iterating over the stored properties of structs and enums. Also, breaking out of the class layout loop like that will leave you with a layout that's missing some stored properties, which could again cause crashes later.

@aschwaighofer aschwaighofer force-pushed the irgen_spot_fix_for_batch_mode_broken_ast branch from 695fc1c to e641c4a Compare February 19, 2020 20:57
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 695fc1cc66f0d4c4a109944ba57070f383e4cc24

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 695fc1cc66f0d4c4a109944ba57070f383e4cc24

@slavapestov
Copy link
Contributor

Thank you!

@aschwaighofer
Copy link
Contributor Author

@swift-ci please test

@aschwaighofer aschwaighofer merged commit d53ff03 into swiftlang:master Feb 20, 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