Skip to content

[APIDigester] Migrate to shared frontend option tables #37206

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 4 commits into from
May 4, 2021

Conversation

owenv
Copy link
Contributor

@owenv owenv commented May 1, 2021

This PR replaces the use of llvm::cl for argument parsing with the shared frontend option tables defined in Options.td. Now that the API digester is a frontend tool, this prevents option definition conflicts with -Xllvm options and any frontend tools that get added in the future. It also means options like -I & -F are parsed the same way by the driver and digester, which will let me remove some hacks in SwiftPM's command line construction for the tool.

This change is not quite NFC. It removes the -include-all and -api-usrs flags, which the tool was no longer checking for. Also, some of the long-form options no longer support the -option=arg form. Because some of the tests rely on it, I am still allowing all of the options to have a single- or double-dash prefix for compatibility.

@owenv
Copy link
Contributor Author

owenv commented May 1, 2021

@swift-ci please smoke test

@owenv
Copy link
Contributor Author

owenv commented May 1, 2021

@swift-ci please smoke test Linux

@owenv owenv marked this pull request as ready for review May 1, 2021 19:28
@owenv owenv requested a review from nkcsgexi May 1, 2021 19:28
Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

This is great, thank you!

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

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

Thank you!

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