diff options
author | David Spickett <david.spickett@linaro.org> | 2024-07-25 13:18:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-25 13:18:11 +0100 |
commit | a466db2b32cccfdbd8bbd27cfa2fb51651192075 (patch) | |
tree | 2b7e1634954d9dfb04fbdd3a67dc1bab0cb41f20 /lldb/source/Plugins/ScriptInterpreter/Python | |
parent | f916cb6184fb04b27ae7b867edcfd162c3a49694 (diff) | |
download | llvm-a466db2b32cccfdbd8bbd27cfa2fb51651192075.zip llvm-a466db2b32cccfdbd8bbd27cfa2fb51651192075.tar.gz llvm-a466db2b32cccfdbd8bbd27cfa2fb51651192075.tar.bz2 |
Revert "[lldb] Fix incorrect logical operator in 'if' condition check (NFC)" (#100561)
Reverts llvm/llvm-project#94779
Due to bot failures:
https://lab.llvm.org/buildbot/#/builders/18/builds/1371
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h index 2667f73..e1a3156 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h @@ -85,15 +85,14 @@ public: bool has_class_name = !class_name.empty(); bool has_interpreter_dict = !(llvm::StringRef(m_interpreter.GetDictionaryName()).empty()); - - if (!has_class_name) - return create_error("Missing script class name."); - - if (!has_interpreter_dict) - return create_error("Invalid script interpreter dictionary."); - - if (!script_obj) - return create_error("Missing scripting object."); + if (!has_class_name && !has_interpreter_dict && !script_obj) { + if (!has_class_name) + return create_error("Missing script class name."); + else if (!has_interpreter_dict) + return create_error("Invalid script interpreter dictionary."); + else + return create_error("Missing scripting object."); + } Locker py_lock(&m_interpreter, Locker::AcquireLock | Locker::NoSTDIN, Locker::FreeLock); |