mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add a “typecheck module interface” mode
This commit is contained in:
@@ -1259,7 +1259,7 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
|
||||
inheritOptionsForBuildingInterface(searchPathOpts, langOpts);
|
||||
// Configure front-end input.
|
||||
auto &SubFEOpts = genericSubInvocation.getFrontendOptions();
|
||||
SubFEOpts.RequestedAction = FrontendOptions::ActionType::EmitModuleOnly;
|
||||
SubFEOpts.RequestedAction = LoaderOpts.requestedAction;
|
||||
if (!moduleCachePath.empty()) {
|
||||
genericSubInvocation.setClangModuleCachePath(moduleCachePath);
|
||||
}
|
||||
@@ -1442,7 +1442,10 @@ bool InterfaceSubContextDelegateImpl::runInSubCompilerInstance(StringRef moduleN
|
||||
std::vector<std::string> outputFiles{"/<unused>"};
|
||||
std::vector<SupplementaryOutputPaths> ModuleOutputPaths;
|
||||
ModuleOutputPaths.emplace_back();
|
||||
ModuleOutputPaths.back().ModuleOutputPath = outputPath.str();
|
||||
if (subInvocation.getFrontendOptions().RequestedAction ==
|
||||
FrontendOptions::ActionType::EmitModuleOnly) {
|
||||
ModuleOutputPaths.back().ModuleOutputPath = outputPath.str();
|
||||
}
|
||||
assert(subInvocation.getFrontendOptions().InputsAndOutputs.isWholeModule());
|
||||
subInvocation.getFrontendOptions().InputsAndOutputs
|
||||
.setMainAndSupplementaryOutputs(outputFiles, ModuleOutputPaths);
|
||||
|
||||
Reference in New Issue
Block a user