diff options
| author | Jim Ingham <jingham@apple.com> | 2022-06-23 09:33:40 -0700 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2022-06-27 15:14:41 -0700 |
| commit | c1b07d617705dfdb3aabbdda51c1a40d99f7cc1a (patch) | |
| tree | ed7886491e1a97d19af06525fca43987a3dfb0a9 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.cpp | |
| parent | 6824eee94203b16de7633050367505c2ad10c56a (diff) | |
Have CommandObjectParsed check for "commands that take no arguments".
This is currently being done in an ad hoc way, and so for some
commands it isn't being checked. We have the info to make this check,
since commands are supposed to add their arguments to the m_arguments
field of the CommandObject. This change uses that info to check whether
the command received arguments in error.
A handful of commands weren't defining their argument types, I also had
to fix them. And a bunch of commands were checking for arguments by
hand, so I removed those checks in favor of the CommandObject one. That
also meant I had to change some tests that were checking for the ad hoc
error outputs.
Differential Revision: https://reviews.llvm.org/D128453
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.cpp')
| -rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.cpp index b6f8b20c90c3..3eb2519dda9e 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptScriptGroup.cpp @@ -39,7 +39,10 @@ public: interpreter, "renderscript scriptgroup breakpoint set", "Place a breakpoint on all kernels forming a script group.", "renderscript scriptgroup breakpoint set <group_name>", - eCommandRequiresProcess | eCommandProcessMustBeLaunched) {} + eCommandRequiresProcess | eCommandProcessMustBeLaunched) { + CommandArgumentData name_arg{eArgTypeName, eArgRepeatPlus}; + m_arguments.push_back({name_arg}); + } ~CommandObjectRenderScriptScriptGroupBreakpointSet() override = default; |
