[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / lldb / source / Commands / CommandObjectVersion.cpp
blob227d5d132d96dfc6b36801842e012dbd522a16e2
1 //===-- CommandObjectVersion.cpp --------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "CommandObjectVersion.h"
11 #include "lldb/Interpreter/CommandReturnObject.h"
12 #include "lldb/lldb-private.h"
14 using namespace lldb;
15 using namespace lldb_private;
17 // CommandObjectVersion
19 CommandObjectVersion::CommandObjectVersion(CommandInterpreter &interpreter)
20 : CommandObjectParsed(interpreter, "version",
21 "Show the LLDB debugger version.", "version") {}
23 CommandObjectVersion::~CommandObjectVersion() {}
25 bool CommandObjectVersion::DoExecute(Args &args, CommandReturnObject &result) {
26 if (args.GetArgumentCount() == 0) {
27 result.AppendMessageWithFormat("%s\n", lldb_private::GetVersion());
28 result.SetStatus(eReturnStatusSuccessFinishResult);
29 } else {
30 result.AppendError("the version command takes no arguments.");
31 result.SetStatus(eReturnStatusFailed);
33 return true;