mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #33114 from brentdax/check-your-interfaces-at-the-door
Verify that just-emitted module interfaces parse and typecheck
This commit is contained in:
@@ -1260,7 +1260,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);
|
||||
}
|
||||
@@ -1445,7 +1445,10 @@ InterfaceSubContextDelegateImpl::runInSubCompilerInstance(StringRef moduleName,
|
||||
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