summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-04-12 09:06:08 +0000
committerPavel Labath <labath@google.com>2016-04-12 09:06:08 +0000
commitba45680758d9a8b3bd57526d827e21858882c324 (patch)
treef71de18dfbb3fe796f13564bf847afbcd143cf91 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parenta6ced02a670ef5a6f3bd4aa8714be63a75fe6ac9 (diff)
downloadbcm5719-llvm-ba45680758d9a8b3bd57526d827e21858882c324.tar.gz
bcm5719-llvm-ba45680758d9a8b3bd57526d827e21858882c324.zip
Revert "Restore the lazy initialization of ScriptInterpreterPython, which was lost as part of the SystemLifetimeManager work"
This change breaks python unit tests. This reverts commit 266033. llvm-svn: 266050
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 104a23e546a..0af1fd53ac8 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)
{
- InitializePrivate();
-
+ assert(g_initialized && "ScriptInterpreterPython created but InitializePrivate has not been called!");
+
m_dictionary_name.append("_dict");
StreamString run_string;
run_string.Printf ("%s = dict()", m_dictionary_name.c_str());
@@ -330,6 +330,8 @@ ScriptInterpreterPython::Initialize()
std::call_once(g_once_flag, []()
{
+ InitializePrivate();
+
PluginManager::RegisterPlugin(GetPluginNameStatic(),
GetPluginDescriptionStatic(),
lldb::eScriptLanguagePython,
@@ -3095,9 +3097,7 @@ ScriptInterpreterPython::InitializeInterpreter (SWIGInitCallback swig_init_callb
void
ScriptInterpreterPython::InitializePrivate ()
{
- if (g_initialized)
- return;
-
+ assert(!g_initialized && "ScriptInterpreterPython::InitializePrivate() called more than once!");
g_initialized = true;
Timer scoped_timer (__PRETTY_FUNCTION__, __PRETTY_FUNCTION__);
OpenPOWER on IntegriCloud