1 //===- mlir-lsp-server.cpp - MLIR Language Server -------------------------===//
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
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"
17 #ifdef MLIR_INCLUDE_TESTS
19 void registerTestDialect(DialectRegistry
&);
20 void registerTestDynDialect(DialectRegistry
&);
21 void registerTestTransformDialectExtension(DialectRegistry
&);
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
);
35 return failed(MlirLspServerMain(argc
, argv
, registry
));