MLIR  21.0.0git
MlirLspServerMain.h
Go to the documentation of this file.
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
16 
17 namespace llvm {
18 struct LogicalResult;
19 } // namespace llvm
20 
21 namespace mlir {
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 &registry);
28 
29 /// Implementation for tools like `mlir-lsp-server`.
30 /// - registry should contain all the dialects that can be parsed in source IR
31 /// passed to the server and may register different dialects depending on the
32 /// input URI.
33 llvm::LogicalResult MlirLspServerMain(int argc, char **argv,
34  lsp::DialectRegistryFn registry_fn);
35 
36 } // namespace mlir
37 
38 #endif // MLIR_TOOLS_MLIR_LSP_SERVER_MLIRLSPSERVERMAIN_H
The OpAsmOpInterface, see OpAsmInterface.td for more details.
Definition: CallGraph.h:229
llvm::function_ref< DialectRegistry &(const URIForFile &uri)> DialectRegistryFn
Include the generated interface declarations.
llvm::LogicalResult MlirLspServerMain(int argc, char **argv, DialectRegistry &registry)
Implementation for tools like mlir-lsp-server.