|
| 1 | +/* |
| 2 | +Copyright 2024 Massimo Fioravanti |
| 3 | +
|
| 4 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +you may not use this file except in compliance with the License. |
| 6 | +You may obtain a copy of the License at |
| 7 | +
|
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +See the License for the specific language governing permissions and |
| 14 | +limitations under the License. |
| 15 | +*/ |
| 16 | +#include "llvm/Support/CommandLine.h" |
| 17 | +#include "llvm/Support/Error.h" |
| 18 | +#include "llvm/Support/MemoryBuffer.h" |
| 19 | +#include "llvm/Support/SourceMgr.h" |
| 20 | +#include "llvm/Support/raw_ostream.h" |
| 21 | +#include "mlir/InitAllDialects.h" |
| 22 | +#include "mlir/Tools/mlir-lsp-server/MlirLspServerMain.h" |
| 23 | +#include "rlc/dialect/Dialect.h" |
| 24 | +#include "rlc/dialect/Passes.hpp" |
| 25 | +#include "rlc/parser/Parser.hpp" |
| 26 | +#include "rlc/utils/IRange.hpp" |
| 27 | + |
| 28 | +using namespace rlc; |
| 29 | +using namespace llvm; |
| 30 | +using namespace std; |
| 31 | + |
| 32 | +int main(int argc, char* argv[]) |
| 33 | +{ |
| 34 | + mlir::rlc::registerdialectPasses(); |
| 35 | + mlir::DialectRegistry registry; |
| 36 | + registry |
| 37 | + .insert<mlir::BuiltinDialect, mlir::rlc::RLCDialect, mlir::DLTIDialect>(); |
| 38 | + return mlir::failed(mlir::MlirLspServerMain(argc, argv, registry)); |
| 39 | +} |
0 commit comments