================
@@ -694,27 +712,32 @@ void CommandObject::GenerateHelpText(Stream &output_strm) 
{
   }
 }
 
-void CommandObject::AddIDsArgumentData(CommandArgumentEntry &arg,
-                                       CommandArgumentType ID,
-                                       CommandArgumentType IDRange) {
+void CommandObject::AddIDsArgumentData(CommandObject::IDType type) {
+  CommandArgumentEntry arg;
   CommandArgumentData id_arg;
   CommandArgumentData id_range_arg;
 
   // Create the first variant for the first (and only) argument for this
   // command.
-  id_arg.arg_type = ID;
+  switch (type) {
+    case eBreakpointArgs:
+      id_arg.arg_type = eArgTypeBreakpointID;
+      id_range_arg.arg_type = eArgTypeBreakpointIDRange;
+      break;
+    case eWatchpointArgs:
+      id_arg.arg_type = eArgTypeWatchpointID;
+      id_range_arg.arg_type = eArgTypeWatchpointIDRange;
+      break;
+  }
----------------
medismailben wrote:

This looks repetitive ... I wonder if every case of this switch could be a 
macro that uses string substitution, to simplify it even more.

https://github.com/llvm/llvm-project/pull/83097
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to