LILAC
Language to language Interop LAyer Compiler
Loading...
Searching...
No Matches
subcommand.cxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024 Yeong-won Seo
3 *
4 * This file is part of LILAC.
5 *
6 * LILAC is free software: you can redistribute it and/or modify it under
7 * the terms of the GNU General Public License as published by the Free
8 * Software Foundation, either version 3, or (at your option) any later
9 * version.
10 *
11 * LILAC is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#include "subcommand.h"
21
22llvm::cl::OptionCategory Category("LILAC Options");
23
24lilac::SubCommand::SubCommand(const char* command, const char* desc)
25 : m_SubCommand(command, desc)
26{
27}
28
29lilac::SubCommand::operator llvm::cl::SubCommand&()
30{
31 return m_SubCommand;
32}
33
34lilac::SubCommand::operator bool() const
35{
36 return m_SubCommand.operator bool();
37}
38
39llvm::cl::OptionCategory& lilac::SubCommand::GetCategory()
40{
41 return Category;
42}
static llvm::cl::OptionCategory & GetCategory()
Gets default category of all sub-commands registered by LILAC.
SubCommand(const char *command, const char *desc)
Creates a sub-command with given name and description.
llvm::cl::OptionCategory Category("LILAC Options")