SIL: Share TypeConverter between SILModules in batch mode

This commit is contained in:
Slava Pestov
2019-08-27 21:58:38 -04:00
parent d434188157
commit 01e65e18c4
16 changed files with 71 additions and 37 deletions

View File

@@ -277,8 +277,7 @@ int main(int argc, char **argv) {
if (Invocation.hasSerializedAST()) {
assert(!CI.hasSILModule() &&
"performSema() should not create a SILModule.");
CI.setSILModule(
SILModule::createEmptyModule(CI.getMainModule(), CI.getSILOptions()));
CI.createSILModule();
std::unique_ptr<SerializedSILLoader> SL = SerializedSILLoader::create(
CI.getASTContext(), CI.getSILModule(), nullptr);