Skip to content

[NFC] Refactor InputFile #33926

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 15 commits into from
Sep 12, 2020
Merged

[NFC] Refactor InputFile #33926

merged 15 commits into from
Sep 12, 2020

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Sep 12, 2020

Refactor InputFile by expanding its documentation, normalizing its accessors and constructors, and scrubbing the frontend of the legacy of InputFileKind, which incorrectly constricted the "kinds" of input files the frontend could accept.

The parameter here was derived from the CompilerInvocation-level parsing bits, which doesn't make any sense. This state is going away soon, so drop the parameter.
@CodaFi
Copy link
Contributor Author

CodaFi commented Sep 12, 2020

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 51acef98d42dbc98da6013458e850fcf86bae7cb

@CodaFi
Copy link
Contributor Author

CodaFi commented Sep 12, 2020

Add a new constructor that takes an explicit file_type::ID to allow for the eventual deletion of InputFileKind.
Tying InputFile to this option meant that every input that was not one of the explictly-blessed kinds was modeled as a Swift file.

With the new InputFile that infers file kinds, we no longer need CompilerInvocation::setInputKind
@CodaFi
Copy link
Contributor Author

CodaFi commented Sep 12, 2020

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 3287c4b

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 3287c4b

@CodaFi
Copy link
Contributor Author

CodaFi commented Sep 12, 2020

@CodaFi
Copy link
Contributor Author

CodaFi commented Sep 12, 2020

swiftlang/llvm-project#1793

@swift-ci test Windows

@CodaFi
Copy link
Contributor Author

CodaFi commented Sep 12, 2020

@CodaFi CodaFi merged commit e6f7b9d into swiftlang:master Sep 12, 2020
@CodaFi CodaFi deleted the just-my-kind branch September 12, 2020 16:01
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.

2 participants