LILAC
Language to language Interop LAyer Compiler
Loading...
Searching...
No Matches
main.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 "
compilesymbolsubcommand.h
"
21
#include "
generatesubcommand.h
"
22
#include "pch.h"
23
#include "
subcommand.h
"
24
#include "
shared/version.h
"
25
26
static
lilac::GenerateSubCommand
GenerateSubCommand{};
27
static
lilac::CompileSymbolSubCommand
CompileSymbolSubCommand{};
28
29
int
main
(
int
argc,
const
char
* argv[])
30
{
31
llvm::cl::SetVersionPrinter([](llvm::raw_ostream& ost)
32
{
33
ost <<
"lilac (LIALC) "
<<
LILAC_DATE
<<
'\n'
<<
LILAC_SHORT_LICENSE
;
34
});
35
llvm::cl::HideUnrelatedOptions(
lilac::SubCommand::GetCategory
());
36
llvm::cl::ParseCommandLineOptions(argc, argv);
37
38
if
(GenerateSubCommand)
39
return
GenerateSubCommand.
Run
();
40
if
(CompileSymbolSubCommand)
41
return
CompileSymbolSubCommand.
Run
();
42
43
llvm::errs() <<
"Subcommand is required\n"
;
44
return
-1;
45
}
lilac::CompileSymbolSubCommand
A sub-command that compiles assemblies into symbols.
Definition
compilesymbolsubcommand.h:31
lilac::CompileSymbolSubCommand::Run
int Run() override
Runs a subcommand.
Definition
compilesymbolsubcommand.cxx:59
lilac::GenerateSubCommand
A sub-command that generates bindings from symbols.
Definition
generatesubcommand.h:31
lilac::GenerateSubCommand::Run
int Run() override
Runs a subcommand.
Definition
generatesubcommand.cxx:75
lilac::SubCommand::GetCategory
static llvm::cl::OptionCategory & GetCategory()
Gets default category of all sub-commands registered by LILAC.
Definition
subcommand.cxx:39
compilesymbolsubcommand.h
generatesubcommand.h
main
int main(int argc, const char *argv[])
Definition
main.cxx:29
subcommand.h
version.h
LILAC_DATE
#define LILAC_DATE
Definition
version.h:51
LILAC_SHORT_LICENSE
#define LILAC_SHORT_LICENSE
Definition
version.h:53
lilac
src
main.cxx
Generated on Sat Oct 5 2024 07:56:20 for LILAC by
1.12.0