Interpreter callback is created after Interpreter ctor.
This commit is contained in:
parent
63e3937b23
commit
8cfa532b72
@ -82,9 +82,8 @@ CreateHostTargetMachine(const clang::CompilerInstance& CI) {
|
||||
} // anonymous namespace
|
||||
|
||||
IncrementalExecutor::IncrementalExecutor(clang::DiagnosticsEngine& diags,
|
||||
const clang::CompilerInstance& CI,
|
||||
InterpreterCallbacks* callbacks):
|
||||
m_Callbacks(callbacks),
|
||||
const clang::CompilerInstance& CI):
|
||||
m_Callbacks(nullptr),
|
||||
m_externalIncrementalExecutor(nullptr)
|
||||
#if 0
|
||||
: m_Diags(diags)
|
||||
|
@ -149,15 +149,14 @@ namespace cling {
|
||||
};
|
||||
|
||||
IncrementalExecutor(clang::DiagnosticsEngine& diags,
|
||||
const clang::CompilerInstance& CI,
|
||||
InterpreterCallbacks* callbacks);
|
||||
const clang::CompilerInstance& CI);
|
||||
|
||||
~IncrementalExecutor();
|
||||
|
||||
void setExternalIncrementalExecutor(IncrementalExecutor *extIncrExec) {
|
||||
m_externalIncrementalExecutor = extIncrExec;
|
||||
}
|
||||
|
||||
void setCallbacks(InterpreterCallbacks* callbacks) { m_Callbacks = callbacks; }
|
||||
void installLazyFunctionCreator(LazyFunctionCreatorFunc_t fp);
|
||||
|
||||
///\brief Send all collected modules to the JIT, making their symbols
|
||||
|
@ -217,8 +217,7 @@ namespace cling {
|
||||
return;
|
||||
|
||||
if (!isInSyntaxOnlyMode()) {
|
||||
m_Executor.reset(new IncrementalExecutor(SemaRef.Diags, *getCI(),
|
||||
m_Callbacks.get()));
|
||||
m_Executor.reset(new IncrementalExecutor(SemaRef.Diags, *getCI()));
|
||||
if (!m_Executor)
|
||||
return;
|
||||
}
|
||||
@ -1435,6 +1434,8 @@ namespace cling {
|
||||
// FIXME: Move to the InterpreterCallbacks.cpp;
|
||||
if (DynamicLibraryManager* DLM = getDynamicLibraryManager())
|
||||
DLM->setCallbacks(m_Callbacks.get());
|
||||
if (m_Executor)
|
||||
m_Executor->setCallbacks(m_Callbacks.get());
|
||||
}
|
||||
|
||||
static_cast<MultiplexInterpreterCallbacks*>(m_Callbacks.get())
|
||||
|
Loading…
x
Reference in New Issue
Block a user