void Interpreter::storeInterpreterState(const std::string& name) const { // This may induce deserialization PushTransactionRAII RAII(this); CodeGenerator* CG = m_IncrParser->getCodeGenerator(); ClangInternalState* state = new ClangInternalState(getCI()->getASTContext(), getCI()->getPreprocessor(), CG ? CG->GetModule() : 0, CG, name); m_StoredStates.push_back(state); }
Interpreter::StateDebuggerRAII::StateDebuggerRAII(const Interpreter* i) : m_Interpreter(i) { if (!i->isPrintingDebug()) return; const CompilerInstance& CI = *m_Interpreter->getCI(); CodeGenerator* CG = i->m_IncrParser->getCodeGenerator(); // The ClangInternalState constructor can provoke deserialization, // we need a transaction. PushTransactionRAII pushedT(i); m_State.reset(new ClangInternalState(CI.getASTContext(), CI.getPreprocessor(), CG ? CG->GetModule() : 0, CG, "aName")); }