This is an archive of the discontinued LLVM Phabricator instance.

Switch the "command script add" interactive editor to use the exe_ctx interface
AcceptedPublic

Authored by jingham on Dec 8 2022, 5:29 PM.

Details

Reviewers
mib
JDevlieghere
Summary

We're suggesting people use the form of the command that takes an exe_ctx - it
is both more convenient and more correct - since you should not be using
GetSelected{Target, Process, etc.} in commands.

Since we write the function template, and this is purely additive, anything you used to enter in this editor mode will still work, you just won't use the new exe_ctx argument. So this shouldn't affect any workflows.

Diff Detail

Event Timeline

jingham created this revision.Dec 8 2022, 5:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 5:29 PM
jingham requested review of this revision.Dec 8 2022, 5:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 5:29 PM
mib accepted this revision.Dec 9 2022, 10:43 AM

LGTM! Thanks!

This revision is now accepted and ready to land.Dec 9 2022, 10:43 AM

Just to make sure I understand: this works because we already supported both variants, and Python picks up the correct one based on the function signature? If so then this LGTM.

Just to make sure I understand: this works because we already supported both variants, and Python picks up the correct one based on the function signature? If so then this LGTM.

Exactly.