Merge pull request #8119 from huonw/imported-modules

This commit is contained in:
swift-ci
2017-03-20 17:52:41 -07:00
committed by GitHub
30 changed files with 303 additions and 21 deletions

View File

@@ -1094,6 +1094,14 @@ void Driver::buildOutputInfo(const ToolChain &TC, const DerivedArgList &Args,
OI.CompilerOutputType = types::TY_PCH;
break;
case options::OPT_emit_imported_modules:
OI.CompilerOutputType = types::TY_ImportedModules;
// We want the imported modules from the module as a whole, not individual
// files, so let's do it in one invocation rather than having to collate
// later.
OI.CompilerMode = OutputInfo::Mode::SingleCompile;
break;
case options::OPT_parse:
case options::OPT_typecheck:
case options::OPT_dump_parse:
@@ -1386,6 +1394,7 @@ void Driver::buildActions(const ToolChain &TC,
case types::TY_SwiftDeps:
case types::TY_Remapping:
case types::TY_PCH:
case types::TY_ImportedModules:
// We could in theory handle assembly or LLVM input, but let's not.
// FIXME: What about LTO?
Diags.diagnose(SourceLoc(), diag::error_unexpected_input_file,