MLIR 22.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
17namespace llvm {
18struct LogicalResult;
19} // namespace llvm
20
21namespace 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.
26llvm::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.
33llvm::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 DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
The OpAsmOpInterface, see OpAsmInterface.td for more details.
Definition CallGraph.h:229
llvm::function_ref< DialectRegistry &(const llvm::lsp::URIForFile &uri)> DialectRegistryFn
Include the generated interface declarations.
llvm::LogicalResult MlirLspServerMain(int argc, char **argv, DialectRegistry &registry)
Implementation for tools like mlir-lsp-server.