This is an archive of the discontinued LLVM Phabricator instance.

Actually report an error when `command script add` is passed a non-existent class
AcceptedPublic

Authored by jingham on Jan 20 2023, 3:10 PM.

Details

Reviewers
JDevlieghere
Summary

Before we were returning a SP with an invalid PythonObject, but the calling
code wants an empty shared pointer as an indication of error. Make it so.

Also added a test for this error.

Diff Detail

Event Timeline

jingham created this revision.Jan 20 2023, 3:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2023, 3:10 PM
jingham requested review of this revision.Jan 20 2023, 3:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2023, 3:10 PM

Committed as: 9093f3c39b8fa8ef836c627e1db329cd7349e9bb. I forgot to include the "differential revision" line.

JDevlieghere accepted this revision.Mar 13 2023, 4:49 PM

LGTM modulo the else-after-return.

lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
1949–1950

No else after return.

This revision is now accepted and ready to land.Mar 13 2023, 4:49 PM