Don’t free the ASTContext if > 1 primary input.

This commit is contained in:
David Ungar
2018-02-01 17:00:18 -08:00
parent 354a76ac4e
commit c396a3a972
5 changed files with 22 additions and 11 deletions

View File

@@ -813,12 +813,12 @@ void CompilerInstance::performParseOnly(bool EvaluateConditionals) {
"Loaded a module during parse-only");
}
void CompilerInstance::freeContextAndSIL() {
void CompilerInstance::freeASTContext() {
Context.reset();
TheSILModule.reset();
MainModule = nullptr;
SML = nullptr;
PrimaryBufferIDs.clear();
PrimarySourceFiles.clear();
}
void CompilerInstance::freeSILModule() { TheSILModule.reset(); }