Sema: Support multiple -debug-forbid-typecheck-prefix arguments.

An existing test (Frontend/skip-function-bodies.swift) was designed under the
assumption that multiple `-debug-forbid-typecheck-prefix` arguments were
already supported, and as a result the test was not actually asserting what it
was written to assert.
This commit is contained in:
Allan Shortlidge
2023-09-25 11:39:42 -07:00
parent 1cd423dbf0
commit 50fdfbf7b4
6 changed files with 26 additions and 14 deletions

View File

@@ -1452,8 +1452,8 @@ static bool ParseTypeCheckerArgs(TypeCheckerOptions &Opts, ArgList &Args,
}
llvm::sort(Opts.DebugConstraintSolverOnLines);
if (const Arg *A = Args.getLastArg(OPT_debug_forbid_typecheck_prefix)) {
Opts.DebugForbidTypecheckPrefix = A->getValue();
for (auto A : Args.getAllArgValues(OPT_debug_forbid_typecheck_prefix)) {
Opts.DebugForbidTypecheckPrefixes.push_back(A);
}
if (Args.getLastArg(OPT_solver_disable_shrink))