1 //===-- CommandObjectLanguage.cpp -------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "lldb/lldb-python.h"
11 
12 #include "CommandObjectLanguage.h"
13 
14 #include "lldb/Host/Host.h"
15 
16 #include "lldb/Interpreter/CommandInterpreter.h"
17 #include "lldb/Interpreter/CommandReturnObject.h"
18 
19 #include "lldb/Target/LanguageRuntime.h"
20 
21 using namespace lldb;
22 using namespace lldb_private;
23 
24 CommandObjectLanguage::CommandObjectLanguage (CommandInterpreter &interpreter) :
25 CommandObjectMultiword (interpreter,
26                         "language",
27                         "A set of commands for managing language-specific functionality.'.",
28                         "language <language-name> <subcommand> [<subcommand-options>]"
29                         )
30 {
31     //Let the LanguageRuntime populates this command with subcommands
32     LanguageRuntime::InitializeCommands(this);
33 }
34 
35 void
36 CommandObjectLanguage::GenerateHelpText (Stream &output_stream) {
37     CommandObjectMultiword::GenerateHelpText(output_stream);
38 
39     output_stream << "\nlanguage name can be one of the following:\n";
40 
41     LanguageRuntime::PrintAllLanguages(output_stream, "  ", "\n");
42 }
43 
44 CommandObjectLanguage::~CommandObjectLanguage ()
45 {
46 }
47