IRGen: Emit runtime initialization into top_level_code for playgrounds.

To help with the playground's transition to top level code, hand the -playground frontend flag down to IRGenOptions, so that IRGen knows to emit runtime initializer code for classes and categories into top_level_code rather than an attributed function.

Swift SVN r18479
This commit is contained in:
Joe Groff
2014-05-21 02:11:09 +00:00
parent 1d34a88477
commit 6c280e27e2
5 changed files with 57 additions and 37 deletions

View File

@@ -872,6 +872,9 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
Opts.OutputFilename = FrontendOpts.OutputFilename;
Opts.ModuleName = FrontendOpts.ModuleName;
if (Args.hasArg(OPT_playground))
Opts.Playground = true;
return false;
}