Fix cling teardown issues when a pch is attached. Kudos to Axel.

This commit is contained in:
Vassil Vassilev 2014-10-01 12:12:08 +02:00 committed by sftnight
parent a4d09be9e2
commit ddf2b82205

View File

@ -233,6 +233,11 @@ namespace cling {
for (size_t i = 0, e = m_StoredStates.size(); i != e; ++i)
delete m_StoredStates[i];
getCI()->getDiagnostics().getClient()->EndSourceFile();
// We want to keep the callback alive during the shutdown of Sema, CodeGen
// and the ASTContext. For that to happen we shut down the IncrementalParser
// explicitly, before the implicit destruction (through the unique_ptr) of
// the callbacks.
m_IncrParser.reset(0);
}
const char* Interpreter::getVersion() const {