A little refactoring of the way to add break IDs or ID ranges as command argument data
to the command argument entry.  Add a static helper function:

    CommandObject::AddIDsArgumentData(CommandArgumentEntry &arg)

to be used from CommandObjectBreakpoint.cpp.  The helper function could also be useful
for commands in the future to manipulate watchpoints.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140221 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/CommandObject.cpp b/source/Interpreter/CommandObject.cpp
index ebfbb0f..0bf4279 100644
--- a/source/Interpreter/CommandObject.cpp
+++ b/source/Interpreter/CommandObject.cpp
@@ -743,6 +743,26 @@
     " meaning of array slicing (taking elements n thru m inside the array or pointed-to memory).";
 }
 
+void
+CommandObject::AddIDsArgumentData(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 = eArgTypeBreakpointID;
+    id_arg.arg_repetition = eArgRepeatOptional;
+
+    // Create the second variant for the first (and only) argument for this command.
+    id_range_arg.arg_type = eArgTypeBreakpointIDRange;
+    id_range_arg.arg_repetition = eArgRepeatOptional;
+
+    // The first (and only) argument for this command could be either a id or a id_range.
+    // Push both variants into the entry for the first argument for this command.
+    arg.push_back(id_arg);
+    arg.push_back(id_range_arg);
+}
+
 const char * 
 CommandObject::GetArgumentTypeAsCString (const lldb::CommandArgumentType arg_type)
 {