1 | //===- mlir-lsp-server.cpp - MLIR Language Server -------------------------===// |
---|---|
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #include "mlir/IR/Dialect.h" |
10 | #include "mlir/IR/MLIRContext.h" |
11 | #include "mlir/InitAllDialects.h" |
12 | #include "mlir/InitAllExtensions.h" |
13 | #include "mlir/Tools/mlir-lsp-server/MlirLspServerMain.h" |
14 | |
15 | using namespace mlir; |
16 | |
17 | #ifdef MLIR_INCLUDE_TESTS |
18 | namespace test { |
19 | void registerTestDialect(DialectRegistry &); |
20 | void registerTestDynDialect(DialectRegistry &); |
21 | void registerTestTransformDialectExtension(DialectRegistry &); |
22 | } // namespace test |
23 | #endif |
24 | |
25 | int main(int argc, char **argv) { |
26 | DialectRegistry registry; |
27 | registerAllDialects(registry); |
28 | registerAllExtensions(registry); |
29 | |
30 | #ifdef MLIR_INCLUDE_TESTS |
31 | ::test::registerTestDialect(registry); |
32 | ::test::registerTestTransformDialectExtension(registry); |
33 | ::test::registerTestDynDialect(registry); |
34 | #endif |
35 | return failed(result: MlirLspServerMain(argc, argv, registry)); |
36 | } |
37 |