[NFC][Coroutines] Use structured binding with llvm::enumerate in CoroSplit (#116879)
[llvm-project.git] / lldb / source / Commands / CommandObjectVersion.cpp
blobf13ec18e240c04d2cad016716d0b644414b3370c
1 //===-- CommandObjectVersion.cpp ------------------------------------------===//
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/Version/Version.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() = default;
25 void CommandObjectVersion::DoExecute(Args &args, CommandReturnObject &result) {
26 result.AppendMessageWithFormat("%s\n", lldb_private::GetVersion());
27 result.SetStatus(eReturnStatusSuccessFinishResult);