Modules containing SIL may not be emitted before SIL diagnostics.

...and probably should not be emitted before optimization passes.
The new frontend got this wrong, and the old one pretended to allow it but
then silently didn't write a module at all.

Swift SVN r13189
This commit is contained in:
Jordan Rose
2014-01-31 01:02:06 +00:00
parent 188d17c555
commit e37d2393d1
2 changed files with 14 additions and 20 deletions

View File

@@ -415,12 +415,12 @@ static bool ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
case FrontendOptions::DumpParse:
case FrontendOptions::DumpAST:
case FrontendOptions::PrintAST:
case FrontendOptions::EmitSILGen:
case FrontendOptions::Immediate:
case FrontendOptions::REPL:
Diags.diagnose(SourceLoc(), diag::error_mode_cannot_emit_module);
return true;
case FrontendOptions::EmitModuleOnly:
case FrontendOptions::EmitSILGen:
case FrontendOptions::EmitSIL:
case FrontendOptions::EmitIR:
case FrontendOptions::EmitBC: