Clean-up the code that stored and passes the SILSerializeAll flag around.

- SILSerializeAll flag is now stored in the SILOptions and passed around as part of it
- Explicit SILSerializeAll/wholeModuleSerialized/makeModuleFragile API parameters are removed in many places
This commit is contained in:
Roman Levenstein
2017-06-16 16:24:30 -07:00
parent 650c0575b7
commit 2a10d8692b
12 changed files with 36 additions and 54 deletions

View File

@@ -691,13 +691,13 @@ static bool performCompile(CompilerInstance &Instance,
}
astGuaranteedToCorrespondToSIL = !fileIsSIB(PrimaryFile);
SM = performSILGeneration(*PrimaryFile, Invocation.getSILOptions(),
None, opts.SILSerializeAll);
None);
} else {
auto mod = Instance.getMainModule();
astGuaranteedToCorrespondToSIL =
llvm::none_of(mod->getFiles(), fileIsSIB);
SM = performSILGeneration(mod, Invocation.getSILOptions(),
opts.SILSerializeAll, true);
true);
}
}
@@ -835,7 +835,8 @@ static bool performCompile(CompilerInstance &Instance,
serializationOpts.OutputPath = opts.ModuleOutputPath.c_str();
serializationOpts.DocOutputPath = opts.ModuleDocOutputPath.c_str();
serializationOpts.GroupInfoPath = opts.GroupInfoPath.c_str();
serializationOpts.SerializeAllSIL = opts.SILSerializeAll;
serializationOpts.SerializeAllSIL =
Invocation.getSILOptions().SILSerializeAll;
if (opts.SerializeBridgingHeader)
serializationOpts.ImportedHeader = opts.ImplicitObjCHeaderPath;
serializationOpts.ModuleLinkName = opts.ModuleLinkName;