Skip to content

Commit 1246a15

Browse files
committed
[Frontend] Relaxed flag combination check.
Previously, combining `-enable-lexical-lifetimes=false` with `-enable-experimental-move-only` resulted in an error. But this is a valid combination: the former sets the `LexicalLifetimes` option to `DiagnosticMarkersOnly`, which is what `-enable-experimental-move-only` relies on.
1 parent c1a50cf commit 1246a15

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,16 +1809,6 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
18091809
return true;
18101810
}
18111811

1812-
if (Args.hasArg(OPT_enable_experimental_move_only) &&
1813-
!enableLexicalLifetimesFlag.value_or(true)) {
1814-
// Error if move-only is enabled and lexical lifetimes--on which it
1815-
// depends--has been disabled.
1816-
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_combination,
1817-
"enable-experimental-move-only",
1818-
"enable-lexical-lifetimes=false");
1819-
return true;
1820-
}
1821-
18221812
// Unless overridden below, enabling copy propagation means enabling lexical
18231813
// lifetimes.
18241814
if (Opts.CopyPropagation == CopyPropagationOption::On) {

0 commit comments

Comments
 (0)