15ffd83dbSDimitry Andric //===-- CommandObjectVersion.cpp ------------------------------------------===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andric #include "CommandObjectVersion.h" 100b57cec5SDimitry Andric 110b57cec5SDimitry Andric #include "lldb/Interpreter/CommandReturnObject.h" 120eae32dcSDimitry Andric #include "lldb/Version/Version.h" 130b57cec5SDimitry Andric 140b57cec5SDimitry Andric using namespace lldb; 150b57cec5SDimitry Andric using namespace lldb_private; 160b57cec5SDimitry Andric 170b57cec5SDimitry Andric // CommandObjectVersion 180b57cec5SDimitry Andric CommandObjectVersion(CommandInterpreter & interpreter)190b57cec5SDimitry AndricCommandObjectVersion::CommandObjectVersion(CommandInterpreter &interpreter) 200b57cec5SDimitry Andric : CommandObjectParsed(interpreter, "version", 210b57cec5SDimitry Andric "Show the LLDB debugger version.", "version") {} 220b57cec5SDimitry Andric 23fe6060f1SDimitry Andric CommandObjectVersion::~CommandObjectVersion() = default; 240b57cec5SDimitry Andric DoExecute(Args & args,CommandReturnObject & result)25*5f757f3fSDimitry Andricvoid CommandObjectVersion::DoExecute(Args &args, CommandReturnObject &result) { 260b57cec5SDimitry Andric result.AppendMessageWithFormat("%s\n", lldb_private::GetVersion()); 270b57cec5SDimitry Andric result.SetStatus(eReturnStatusSuccessFinishResult); 280b57cec5SDimitry Andric } 29