Skip to content

Commit a466db2

Browse files
Revert "[lldb] Fix incorrect logical operator in 'if' condition check (NFC)" (#100561)
Reverts #94779 Due to bot failures: https://lab.llvm.org/buildbot/#/builders/18/builds/1371
1 parent f916cb6 commit a466db2

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,14 @@ class ScriptedPythonInterface : virtual public ScriptedInterface {
8585
bool has_class_name = !class_name.empty();
8686
bool has_interpreter_dict =
8787
!(llvm::StringRef(m_interpreter.GetDictionaryName()).empty());
88-
89-
if (!has_class_name)
90-
return create_error("Missing script class name.");
91-
92-
if (!has_interpreter_dict)
93-
return create_error("Invalid script interpreter dictionary.");
94-
95-
if (!script_obj)
96-
return create_error("Missing scripting object.");
88+
if (!has_class_name && !has_interpreter_dict && !script_obj) {
89+
if (!has_class_name)
90+
return create_error("Missing script class name.");
91+
else if (!has_interpreter_dict)
92+
return create_error("Invalid script interpreter dictionary.");
93+
else
94+
return create_error("Missing scripting object.");
95+
}
9796

9897
Locker py_lock(&m_interpreter, Locker::AcquireLock | Locker::NoSTDIN,
9998
Locker::FreeLock);

0 commit comments

Comments
 (0)