mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SIL: Share TypeConverter between SILModules in batch mode
This commit is contained in:
@@ -61,6 +61,7 @@ namespace {
|
||||
struct IRGenContext {
|
||||
IRGenOptions IROpts;
|
||||
SILOptions SILOpts;
|
||||
Lowering::TypeConverter TC;
|
||||
std::unique_ptr<SILModule> SILMod;
|
||||
llvm::LLVMContext LLVMContext;
|
||||
irgen::IRGenerator IRGen;
|
||||
@@ -69,7 +70,8 @@ struct IRGenContext {
|
||||
private:
|
||||
IRGenContext(ASTContext &ctx, ModuleDecl *module)
|
||||
: IROpts(createIRGenOptions()),
|
||||
SILMod(SILModule::createEmptyModule(module, SILOpts)),
|
||||
TC(*module),
|
||||
SILMod(SILModule::createEmptyModule(module, TC, SILOpts)),
|
||||
IRGen(IROpts, *SILMod),
|
||||
IGM(IRGen, IRGen.createTargetMachine(), LLVMContext) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user