-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Const-Qualify LangOptions and TypeCheckerOptions #31721
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
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to change the CMake to avoid passing this to SwiftOnoneSupport?
I'll get it in a follow-up. |
c153241
to
c1db4be
Compare
@swift-ci smoke test |
@swift-ci test Windows |
…bodies This allows us to push the validation and, importantly, the mutation of this flag into the compiler invocation where it belongs.
The constraint system will need this if it wants to disable debug mode for serialized modules
This eliminates the final source of mutation of the TypeCheckerFlags on the ASTContext.
c1db4be
to
2bca013
Compare
@swift-ci smoke test |
@swift-ci clean smoke test Linux platform |
⛵ |
This required moving aside the hacks that necessitated mutating these options outside of the frontend.
For LangOptions,
-experimental-skip-function-bodies
was silently disabling itself if the module under scrutiny wasSwiftOnoneSupport
. Push this computation into the frontend and warn about it.For TypeCheckerOptions the main offender was the expression checker's debugging flags. For these, add a bit to
ConstraintSystemFlags
and convert the save-and-restore patterns to use that instead. A beneficial behavior where constraint debugging was turned off for loaded modules is being emulated by plumbing the notion of the "main module" intoModuleDecl
itself.