[frontend] Added a check to disallow the combination of -i and -primary-file.

Swift SVN r12524
This commit is contained in:
Connor Wakamo
2014-01-18 00:55:47 +00:00
parent a23b6408a9
commit de753a659b

View File

@@ -178,6 +178,12 @@ static bool ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
// TODO: emit diagnostic
llvm::errs() << "error: REPL mode requires no input files\n";
return true;
} else if (Opts.RequestedAction == FrontendOptions::Immediate &&
Opts.PrimaryInput.hasValue()) {
// TODO: emit diagnostic
llvm::errs() << "error: immediate mode is incompatible with -primary-file"
<< '\n';
return true;
}
if (Args.hasArg(OPT_parse_sil) ||