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/Tools/mlir-lsp-server/MlirLspServerMain.h" 13 14 using namespace mlir; 15 16 #ifdef MLIR_INCLUDE_TESTS 17 namespace test { 18 void registerTestDialect(DialectRegistry &); 19 void registerTestTransformDialectExtension(DialectRegistry &); 20 } // namespace test 21 #endif 22 main(int argc,char ** argv)23int main(int argc, char **argv) { 24 DialectRegistry registry; 25 registerAllDialects(registry); 26 #ifdef MLIR_INCLUDE_TESTS 27 ::test::registerTestDialect(registry); 28 ::test::registerTestTransformDialectExtension(registry); 29 #endif 30 return failed(MlirLspServerMain(argc, argv, registry)); 31 } 32