mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Frontend] -validate-tbd-against-ir has 3 levels of validation.
It can now: - not validate (=none) - validate that all symbols in the IR are also in the TBD (=missing), - validate the above, and also that all in the TBD are in the IR (=all). The first and last were switched between with the old boolean flag, the second is new.
This commit is contained in:
@@ -191,7 +191,20 @@ static bool ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
|
||||
Opts.StatsOutputDir = A->getValue();
|
||||
}
|
||||
|
||||
Opts.ValidateTBDAgainstIR |= Args.hasArg(OPT_validate_tbd_against_ir);
|
||||
if (const Arg *A = Args.getLastArg(OPT_validate_tbd_against_ir_EQ)) {
|
||||
using Mode = FrontendOptions::TBDValidationMode;
|
||||
StringRef value = A->getValue();
|
||||
if (value == "none") {
|
||||
Opts.ValidateTBDAgainstIR = Mode::None;
|
||||
} else if (value == "missing") {
|
||||
Opts.ValidateTBDAgainstIR = Mode::MissingFromTBD;
|
||||
} else if (value == "all") {
|
||||
Opts.ValidateTBDAgainstIR = Mode::All;
|
||||
} else {
|
||||
Diags.diagnose(SourceLoc(), diag::error_unsupported_option_argument,
|
||||
A->getOption().getPrefixedName(), value);
|
||||
}
|
||||
}
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_warn_long_function_bodies)) {
|
||||
unsigned attempt;
|
||||
|
||||
Reference in New Issue
Block a user