1cfca06d7SDimitry Andric //===-- CommandObjectVersion.cpp ------------------------------------------===// 2f034231aSEd Maste // 35f29bb8aSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 45f29bb8aSDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 55f29bb8aSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6f034231aSEd Maste // 7f034231aSEd Maste //===----------------------------------------------------------------------===// 8f034231aSEd Maste 9f034231aSEd Maste #include "CommandObjectVersion.h" 10f034231aSEd Maste 11f034231aSEd Maste #include "lldb/Interpreter/CommandReturnObject.h" 1277fc4c14SDimitry Andric #include "lldb/Version/Version.h" 13f034231aSEd Maste 14f034231aSEd Maste using namespace lldb; 15f034231aSEd Maste using namespace lldb_private; 16f034231aSEd Maste 17f034231aSEd Maste // CommandObjectVersion 18f034231aSEd Maste CommandObjectVersion(CommandInterpreter & interpreter)19f3fbd1c0SDimitry AndricCommandObjectVersion::CommandObjectVersion(CommandInterpreter &interpreter) 2014f1b3e8SDimitry Andric : CommandObjectParsed(interpreter, "version", 2114f1b3e8SDimitry Andric "Show the LLDB debugger version.", "version") {} 22f034231aSEd Maste 23344a3780SDimitry Andric CommandObjectVersion::~CommandObjectVersion() = default; 24f034231aSEd Maste DoExecute(Args & args,CommandReturnObject & result)25b1c73532SDimitry Andricvoid CommandObjectVersion::DoExecute(Args &args, CommandReturnObject &result) { 26f034231aSEd Maste result.AppendMessageWithFormat("%s\n", lldb_private::GetVersion()); 27f034231aSEd Maste result.SetStatus(eReturnStatusSuccessFinishResult); 28f034231aSEd Maste } 29