[Serialization] Write in the swiftmodule if it's built from a swiftinterface

This information will allow us to distinguish swiftmodule built from
source vs swiftinterface.
This commit is contained in:
Alexis Laferrière
2022-10-25 13:40:52 -07:00
parent 79565a4f9e
commit 2854c1b3cb
10 changed files with 46 additions and 3 deletions

View File

@@ -249,6 +249,7 @@ std::error_code ExplicitModuleInterfaceBuilder::buildSwiftModuleFromInterface(
SILOptions &SILOpts = Invocation.getSILOptions();
auto Mod = Instance.getMainModule();
Mod->setIsBuiltFromInterface(true);
auto &TC = Instance.getSILTypes();
auto SILMod = performASTLowering(Mod, TC, SILOpts);
if (!SILMod) {