Prevent re-parse of "#include \"RuntimeUniverse.h\"".
This commit is contained in:
parent
e7a9c01eb0
commit
5ff794a175
@ -158,6 +158,10 @@ namespace cling {
|
||||
///
|
||||
bool m_PrintDebug;
|
||||
|
||||
///\brief Whether DynamicLookupRuntimeUniverse.h has been parsed.
|
||||
///
|
||||
bool m_DynamicLookupDeclared;
|
||||
|
||||
///\brief Flag toggling the dynamic scopes on or off.
|
||||
///
|
||||
bool m_DynamicLookupEnabled;
|
||||
|
@ -166,7 +166,7 @@ namespace cling {
|
||||
|
||||
Interpreter::Interpreter(int argc, const char* const *argv,
|
||||
const char* llvmdir /*= 0*/, bool noRuntime) :
|
||||
m_UniqueCounter(0), m_PrintDebug(false),
|
||||
m_UniqueCounter(0), m_PrintDebug(false), m_DynamicLookupDeclared(false),
|
||||
m_DynamicLookupEnabled(false), m_RawInputEnabled(false),
|
||||
m_LastCustomPragmaDiagPopPoint(){
|
||||
|
||||
@ -1140,11 +1140,12 @@ namespace cling {
|
||||
void Interpreter::enableDynamicLookup(bool value /*=true*/) {
|
||||
m_DynamicLookupEnabled = value;
|
||||
|
||||
if (isDynamicLookupEnabled()) {
|
||||
if (!m_DynamicLookupDeclared && isDynamicLookupEnabled()) {
|
||||
if (loadModuleForHeader("cling/Interpreter/DynamicLookupRuntimeUniverse.h")
|
||||
!= kSuccess)
|
||||
declare("#include \"cling/Interpreter/DynamicLookupRuntimeUniverse.h\"");
|
||||
}
|
||||
m_DynamicLookupDeclared = true;
|
||||
}
|
||||
|
||||
Interpreter::ExecutionResult
|
||||
|
Loading…
Reference in New Issue
Block a user