[Frontend] When setting the MainInputFilename in the compiler invocation, check first that the input filenames vector is not empty.

Swift SVN r11484
This commit is contained in:
Argyrios Kyrtzidis
2013-12-19 22:29:27 +00:00
parent 28d579fd1d
commit 21518ab695

View File

@@ -329,7 +329,8 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
// TODO: investigate whether these should be removed, in favor of definitions
// in other classes.
Opts.MainInputFilename = FrontendOpts.InputFilenames[0];
if (!FrontendOpts.InputFilenames.empty())
Opts.MainInputFilename = FrontendOpts.InputFilenames[0];
Opts.OutputFilename = FrontendOpts.OutputFilename;
if (const Arg *A = Args.getLastArg(OPT_target)) {