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