Author: David Spickett Date: 2024-07-25T13:16:55+01:00 New Revision: b85152008f41e8136f5e21db875a63b464f8c10f
URL: https://github.com/llvm/llvm-project/commit/b85152008f41e8136f5e21db875a63b464f8c10f DIFF: https://github.com/llvm/llvm-project/commit/b85152008f41e8136f5e21db875a63b464f8c10f.diff LOG: Revert "[lldb] Fix incorrect uses of logical operator in 'if' condition check…" This reverts commit 2ba3fe7356f065757a2279f65e4ef5c8f1476293. Added: Modified: lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h Removed: ################################################################################ diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h index 2667f73516ba3..e1a3156d10afd 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h @@ -85,15 +85,14 @@ class ScriptedPythonInterface : virtual public ScriptedInterface { 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); _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits