mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user