summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2016-04-12 01:08:35 +0000
committerEnrico Granata <egranata@apple.com>2016-04-12 01:08:35 +0000
commitb184bfa13b9f930f1077bc8e670b2ae46b3cce2e (patch)
tree7df8e959a290acc2ee37c03fb9447029e0b25744 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent278199f615d9f9e224e5033b9558c6ed974cbf37 (diff)
downloadbcm5719-llvm-b184bfa13b9f930f1077bc8e670b2ae46b3cce2e.tar.gz
bcm5719-llvm-b184bfa13b9f930f1077bc8e670b2ae46b3cce2e.zip
Restore the lazy initialization of ScriptInterpreterPython, which was lost as part of the SystemLifetimeManager work
llvm-svn: 266033
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index 0af1fd53ac8..104a23e546a 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -274,8 +274,8 @@ ScriptInterpreterPython::ScriptInterpreterPython(CommandInterpreter &interpreter
m_lock_count(0),
m_command_thread_state(nullptr)
{
- assert(g_initialized && "ScriptInterpreterPython created but InitializePrivate has not been called!");
-
+ InitializePrivate();
+
m_dictionary_name.append("_dict");
StreamString run_string;
run_string.Printf ("%s = dict()", m_dictionary_name.c_str());
@@ -330,8 +330,6 @@ ScriptInterpreterPython::Initialize()
std::call_once(g_once_flag, []()
{
- InitializePrivate();
-
PluginManager::RegisterPlugin(GetPluginNameStatic(),
GetPluginDescriptionStatic(),
lldb::eScriptLanguagePython,
@@ -3097,7 +3095,9 @@ ScriptInterpreterPython::InitializeInterpreter (SWIGInitCallback swig_init_callb
void
ScriptInterpreterPython::InitializePrivate ()
{
- assert(!g_initialized && "ScriptInterpreterPython::InitializePrivate() called more than once!");
+ if (g_initialized)
+ return;
+
g_initialized = true;
Timer scoped_timer (__PRETTY_FUNCTION__, __PRETTY_FUNCTION__);
OpenPOWER on IntegriCloud