mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add frontend flag -import-module <name>.
This implicitly adds the named module as an import of every source file in the module being compiled. This is not intended to be used generally, but will be useful for playgrounds. rdar://problem/19605934 Swift SVN r24905
This commit is contained in:
@@ -535,6 +535,9 @@ static bool ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
|
||||
!Opts.PrimaryInput && !Opts.ModuleOutputPath.empty();
|
||||
}
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_import_module))
|
||||
Opts.ImplicitImportModuleName = A->getValue();
|
||||
|
||||
for (const Arg *A : make_range(Args.filtered_begin(OPT_Xllvm),
|
||||
Args.filtered_end())) {
|
||||
Opts.LLVMArgs.push_back(A->getValue());
|
||||
|
||||
Reference in New Issue
Block a user