Skip to content

ABI checker: add a flag to opt-in diagnosing deprecated symbols #63758

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
Feb 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/swift/Option/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -1541,6 +1541,10 @@ def disable_remove_deprecated_check: Flag<["-", "--"], "disable-remove-deprecate
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
HelpText<"Skip diagnosing removal of deprecated symbols">;

def enable_remove_deprecated_check: Flag<["-", "--"], "enable-remove-deprecated-check">,
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
HelpText<"Diagnosing removal of deprecated symbols">;

def print_module: Flag<["-", "--"], "print-module">,
Flags<[NoDriverOption, SwiftAPIDigesterOption]>,
HelpText<"Print module names in diagnostics">;
Expand Down
3 changes: 3 additions & 0 deletions lib/DriverTool/swift_api_digester_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2371,6 +2371,9 @@ class SwiftAPIDigesterInvocation {
ParsedArgs.hasArg(OPT_abi) || ParsedArgs.hasArg(OPT_swift_only);
CheckerOpts.SkipOSCheck = ParsedArgs.hasArg(OPT_disable_os_checks);
CheckerOpts.SkipRemoveDeprecatedCheck = ParsedArgs.hasArg(OPT_disable_remove_deprecated_check);
if (ParsedArgs.hasArg(OPT_enable_remove_deprecated_check)) {
CheckerOpts.SkipRemoveDeprecatedCheck = false;
}
CheckerOpts.CompilerStyle =
CompilerStyleDiags || !SerializedDiagPath.empty();
for (auto Arg : Args)
Expand Down