Skip to content

-build-module-from-parseable-interface: Don't make an extra ASTContext #25185

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
Jun 1, 2019

Conversation

jrose-apple
Copy link
Contributor

@jrose-apple jrose-apple commented Jun 1, 2019

This mode is supposed to get all its configuration information from the switftinterface being read in, but that means that the ASTContext and ClangImporter that get created by default may not be a sensible configuration (for example, a mismatched target and SDK, which Clang emits a warning about). Avoid this by just not creating the ASTContext if it's already been determined that the frontend is building a module from a parseable module interface.

This mode is supposed to get all its configuration information from
the switftinterface being read in, but that means that the ASTContext
and ClangImporter that get created by default may not be a sensible
configuration (for example, a mismatched target and SDK, which Clang
emits a warning about). Avoid this by just not creating the ASTContext
if it's already been determined that the frontend is building a module
from a parseable interface.
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Jun 1, 2019

Build failed
Swift Test OS X Platform
Git Sha - 354b9b2

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple jrose-apple merged commit 0f45437 into swiftlang:master Jun 1, 2019
@jrose-apple jrose-apple deleted the grammar! branch June 1, 2019 22:28
jrose-apple added a commit to jrose-apple/swift that referenced this pull request Jun 1, 2019
swiftlang#25185)

This mode is supposed to get all its configuration information from
the switftinterface being read in, but that means that the ASTContext
and ClangImporter that get created by default may not be a sensible
configuration (for example, a mismatched target and SDK, which Clang
emits a warning about). Avoid this by just not creating the ASTContext
if it's already been determined that the frontend is building a module
from a parseable interface.

(cherry picked from commit 0f45437)
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.

4 participants