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

@@ -21,6 +21,7 @@
//===----------------------------------------------------------------------===//
#include "swift/FrontendTool/FrontendTool.h"
#include "ImportedModules.h"
#include "ReferenceDependencies.h"
#include "swift/Subsystems.h"
@@ -390,7 +391,8 @@ static bool performCompile(std::unique_ptr<CompilerInstance> &Instance,
if (Action == FrontendOptions::Parse ||
Action == FrontendOptions::DumpParse ||
Action == FrontendOptions::DumpInterfaceHash)
Action == FrontendOptions::DumpInterfaceHash ||
Action == FrontendOptions::EmitImportedModules)
Instance->performParseOnly();
else
Instance->performSema();
@@ -485,6 +487,9 @@ static bool performCompile(std::unique_ptr<CompilerInstance> &Instance,
else
SF->dump();
return Context.hadError();
} else if (Action == FrontendOptions::EmitImportedModules) {
emitImportedModules(Context, Instance->getMainModule(), opts);
return Context.hadError();
}
// If we were asked to print Clang stats, do so.