[RISCV][NFC] precommit for D159399
[llvm-project.git] / mlir / tools / mlir-lsp-server / mlir-lsp-server.cpp
blobf0ecc5adc68b36c5880899ec2ba60da82aec1df6
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 //===----------------------------------------------------------------------===//
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"
15 using namespace mlir;
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
25 int main(int argc, char **argv) {
26 DialectRegistry registry;
27 registerAllDialects(registry);
28 registerAllExtensions(registry);
30 #ifdef MLIR_INCLUDE_TESTS
31 ::test::registerTestDialect(registry);
32 ::test::registerTestTransformDialectExtension(registry);
33 ::test::registerTestDynDialect(registry);
34 #endif
35 return failed(MlirLspServerMain(argc, argv, registry));