[Lldb-commits] [lldb] r177793 - Only get the script interpreter if we find scripting resources in the symbol file. This helps us avoid initializing python when it isn't needed.
Greg Clayton
gclayton at apple.com
Fri Mar 22 17:50:58 PDT 2013
Author: gclayton
Date: Fri Mar 22 19:50:58 2013
New Revision: 177793
URL: http://llvm.org/viewvc/llvm-project?rev=177793&view=rev
Log:
Only get the script interpreter if we find scripting resources in the symbol file. This helps us avoid initializing python when it isn't needed.
Modified:
lldb/trunk/source/Core/Module.cpp
Modified: lldb/trunk/source/Core/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=177793&r1=177792&r2=177793&view=diff
==============================================================================
--- lldb/trunk/source/Core/Module.cpp (original)
+++ lldb/trunk/source/Core/Module.cpp Fri Mar 22 19:50:58 2013
@@ -1196,15 +1196,15 @@ Module::LoadScriptingResourceInTarget (T
return false;
}
- ScriptInterpreter *script_interpreter = debugger.GetCommandInterpreter().GetScriptInterpreter();
- if (script_interpreter)
+ FileSpecList file_specs = platform_sp->LocateExecutableScriptingResources (target,
+ *this);
+
+
+ const uint32_t num_specs = file_specs.GetSize();
+ if (num_specs)
{
- FileSpecList file_specs = platform_sp->LocateExecutableScriptingResources (target,
- *this);
-
-
- const uint32_t num_specs = file_specs.GetSize();
- if (num_specs)
+ ScriptInterpreter *script_interpreter = debugger.GetCommandInterpreter().GetScriptInterpreter();
+ if (script_interpreter)
{
for (uint32_t i=0; i<num_specs; ++i)
{
@@ -1222,11 +1222,11 @@ Module::LoadScriptingResourceInTarget (T
}
}
}
- }
- else
- {
- error.SetErrorString("invalid ScriptInterpreter");
- return false;
+ else
+ {
+ error.SetErrorString("invalid ScriptInterpreter");
+ return false;
+ }
}
}
return true;
More information about the lldb-commits
mailing list