mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge remote-tracking branch 'origin/main' into rebranch
This commit is contained in:
@@ -689,6 +689,21 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
Opts.AllowModuleWithCompilerErrors = true;
|
||||
}
|
||||
|
||||
if (auto A =
|
||||
Args.getLastArg(OPT_enable_ast_verifier, OPT_disable_ast_verifier)) {
|
||||
using ASTVerifierOverrideKind = LangOptions::ASTVerifierOverrideKind;
|
||||
if (A->getOption().matches(OPT_enable_ast_verifier)) {
|
||||
Opts.ASTVerifierOverride = ASTVerifierOverrideKind::EnableVerifier;
|
||||
} else if (A->getOption().matches(OPT_disable_ast_verifier)) {
|
||||
Opts.ASTVerifierOverride = ASTVerifierOverrideKind::DisableVerifier;
|
||||
} else {
|
||||
// This is an assert since getLastArg should not have let us get here if
|
||||
// we did not have one of enable/disable specified.
|
||||
llvm_unreachable(
|
||||
"Should have found one of enable/disable ast verifier?!");
|
||||
}
|
||||
}
|
||||
|
||||
return HadError || UnsupportedOS || UnsupportedArch;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user