Construct execution context only if there is codegen enabled.

This commit is contained in:
Vassil Vassilev 2013-06-10 15:44:36 +02:00 committed by sftnight
parent 78ea68614a
commit 52c25a3f40

View File

@ -192,7 +192,10 @@ namespace cling {
/*SkipFunctionBodies*/false,
/*isTemp*/true), this));
m_ExecutionContext.reset(new ExecutionContext());
if (m_IncrParser->hasCodeGenerator()) {
llvm::Module* theModule = m_IncrParser->getCodeGenerator()->GetModule();
m_ExecutionContext.reset(new ExecutionContext(theModule));
}
m_IncrParser->Initialize();