Modify existing commands with arguments to use the new argument mechanism
(for standardized argument names, argument help, etc.)



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115570 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectExpression.cpp b/source/Commands/CommandObjectExpression.cpp
index 886bc8b..adc8eb1 100644
--- a/source/Commands/CommandObjectExpression.cpp
+++ b/source/Commands/CommandObjectExpression.cpp
@@ -106,7 +106,7 @@
     CommandObject (interpreter,
                    "expression",
                    "Evaluate a C/ObjC/C++ expression in the current program context, using variables currently in scope.",
-                   "expression [<cmd-options>] <expr>"),
+                   NULL),
     m_expr_line_count (0),
     m_expr_lines ()
 {
@@ -116,6 +116,19 @@
    expr my_struct->a = my_array[3] \n\
    expr -f bin -- (index * 8) + 5 \n\
    expr char c[] = \"foo\"; c[0]\n");
+
+    CommandArgumentEntry arg;
+    CommandArgumentData expression_arg;
+
+    // Define the first (and only) variant of this arg.
+    expression_arg.arg_type = eArgTypeExpression;
+    expression_arg.arg_repetition = eArgRepeatPlain;
+
+    // There is only one variant this argument could be; put it into the argument entry.
+    arg.push_back (expression_arg);
+
+    // Push the data for the first argument into the m_arguments vector.
+    m_arguments.push_back (arg);
 }
 
 CommandObjectExpression::~CommandObjectExpression ()