[ModuleInterface] Specify module as supplementary rather than main output.

This commit is contained in:
Graydon Hoare
2018-10-11 23:02:45 -07:00
parent 7b3149bd7c
commit 63e1e166db

View File

@@ -98,8 +98,10 @@ ParseableInterfaceModuleLoader::configureSubInvocationAndOutputPath(
auto &FEOpts = SubInvocation.getFrontendOptions();
FEOpts.RequestedAction = FrontendOptions::ActionType::EmitModuleOnly;
FEOpts.InputsAndOutputs.addPrimaryInputFile(InPath);
FEOpts.InputsAndOutputs.setMainAndSupplementaryOutputs(
{OutPath.str()}, {SupplementaryOutputPaths()});
SupplementaryOutputPaths SOPs;
SOPs.ModuleOutputPath = OutPath.str();
StringRef MainOut = "/dev/null";
FEOpts.InputsAndOutputs.setMainAndSupplementaryOutputs({MainOut}, {SOPs});
}
// FIXME: this needs to be a more extensive up-to-date check.