Revert "Fix cling tear down crash involving the ExternalSemaSource."

This reverts commit d320b74acf5172f62b8ac565955ea6497688d225.
This commit is contained in:
Vassil Vassilev 2014-10-01 12:13:51 +02:00 committed by sftnight
parent ddf2b82205
commit 5563ab3d68
2 changed files with 2 additions and 6 deletions

View File

@ -53,8 +53,7 @@ namespace cling {
///\brief Our custom SemaExternalSource, translating interesting events into
/// callbacks.
///
///This must be a RefCntPtr has internally the ASTContext is using one too.
llvm::IntrusiveRefCntPtr<InterpreterExternalSemaSource> m_ExternalSemaSource;
std::unique_ptr<InterpreterExternalSemaSource> m_ExternalSemaSource;
///\brief Our custom ASTDeserializationListener, translating interesting
/// events into callbacks.

View File

@ -167,10 +167,7 @@ namespace cling {
if (!externalSemaSrc || externalSemaSrc == Reader) {
// If the ExternalSemaSource is the PCH reader we still need to insert
// our listener.
llvm::IntrusiveRefCntPtr<InterpreterExternalSemaSource>
tmpptr(new InterpreterExternalSemaSource(this));
m_ExternalSemaSource.swap(tmpptr);
m_ExternalSemaSource.reset(new InterpreterExternalSemaSource(this));
m_ExternalSemaSource->InitializeSema(SemaRef);
m_Interpreter->getSema().addExternalSource(m_ExternalSemaSource.get());