1 //===- MlirLspServerMain.h - MLIR Language Server main ----------*- C++ -*-===// 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 // Main entry function for mlir-lsp-server for when built as standalone binary. 10 // 11 //===----------------------------------------------------------------------===// 12 13 #ifndef MLIR_TOOLS_MLIR_LSP_SERVER_MLIRLSPSERVERMAIN_H 14 #define MLIR_TOOLS_MLIR_LSP_SERVER_MLIRLSPSERVERMAIN_H 15 16 namespace llvm { 17 struct LogicalResult; 18 } // namespace llvm 19 20 namespace mlir { 21 class DialectRegistry; 22 23 /// Implementation for tools like `mlir-lsp-server`. 24 /// - registry should contain all the dialects that can be parsed in source IR 25 /// passed to the server. 26 llvm::LogicalResult MlirLspServerMain(int argc, char **argv, 27 DialectRegistry ®istry); 28 29 } // namespace mlir 30 31 #endif // MLIR_TOOLS_MLIR_LSP_SERVER_MLIRLSPSERVERMAIN_H 32