Modernize the Args access pattern in a few more commands.

llvm-svn: 289164
diff --git a/lldb/source/Commands/CommandObjectHelp.cpp b/lldb/source/Commands/CommandObjectHelp.cpp
index 41da682..99e9d7b 100644
--- a/lldb/source/Commands/CommandObjectHelp.cpp
+++ b/lldb/source/Commands/CommandObjectHelp.cpp
@@ -108,11 +108,8 @@
     // Get command object for the first command argument. Only search built-in
     // command dictionary.
     StringList matches;
-    cmd_obj =
-        m_interpreter.GetCommandObject(command.GetArgumentAtIndex(0), &matches);
-    bool is_alias_command =
-        m_interpreter.AliasExists(command.GetArgumentAtIndex(0));
-    std::string alias_name = command.GetArgumentAtIndex(0);
+    auto command_name = command[0].ref;
+    cmd_obj = m_interpreter.GetCommandObject(command_name, &matches);
 
     if (cmd_obj != nullptr) {
       StringList matches;
@@ -176,11 +173,11 @@
 
       sub_cmd_obj->GenerateHelpText(result);
 
-      if (is_alias_command) {
+      if (m_interpreter.AliasExists(command_name)) {
         StreamString sstr;
-        m_interpreter.GetAlias(alias_name)->GetAliasExpansion(sstr);
+        m_interpreter.GetAlias(command_name)->GetAliasExpansion(sstr);
         result.GetOutputStream().Printf("\n'%s' is an abbreviation for %s\n",
-                                        alias_name.c_str(), sstr.GetData());
+                                        command[0].c_str(), sstr.GetData());
       }
     } else if (matches.GetSize() > 0) {
       Stream &output_strm = result.GetOutputStream();
@@ -194,16 +191,16 @@
       // Maybe the user is asking for help about a command argument rather than
       // a command.
       const CommandArgumentType arg_type =
-          CommandObject::LookupArgumentName(command.GetArgumentAtIndex(0));
+          CommandObject::LookupArgumentName(command_name);
       if (arg_type != eArgTypeLastArg) {
         Stream &output_strm = result.GetOutputStream();
         CommandObject::GetArgumentHelp(output_strm, arg_type, m_interpreter);
         result.SetStatus(eReturnStatusSuccessFinishNoResult);
       } else {
         StreamString error_msg_stream;
-        GenerateAdditionalHelpAvenuesMessage(&error_msg_stream,
-                                             command.GetArgumentAtIndex(0),
-                                             m_interpreter.GetCommandPrefix(), "");
+        GenerateAdditionalHelpAvenuesMessage(&error_msg_stream, command_name,
+                                             m_interpreter.GetCommandPrefix(),
+                                             "");
         result.AppendError(error_msg_stream.GetString());
         result.SetStatus(eReturnStatusFailed);
       }
@@ -225,8 +222,7 @@
         input, cursor_index, cursor_char_position, match_start_point,
         max_return_elements, word_complete, matches);
   } else {
-    CommandObject *cmd_obj =
-        m_interpreter.GetCommandObject(input.GetArgumentAtIndex(0));
+    CommandObject *cmd_obj = m_interpreter.GetCommandObject(input[0].ref);
 
     // The command that they are getting help on might be ambiguous, in which
     // case we should complete that,