From b9d8890bd900416f562192608bdc72143801845b Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Sat, 23 Mar 2013 00:50:58 +0000 Subject: 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. llvm-svn: 177793 --- lldb/source/Core/Module.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'lldb/source/Core/Module.cpp') diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 2341144132b..822fbd8f1c6 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -1196,15 +1196,15 @@ Module::LoadScriptingResourceInTarget (Target *target, Error& error) 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