1//===----------------------------------------------------------------------===//
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// A language server for ClangIR
10//
11//===----------------------------------------------------------------------===//
12
13#include "mlir/IR/Dialect.h"
14#include "mlir/IR/MLIRContext.h"
15#include "mlir/InitAllDialects.h"
16#include "mlir/Tools/mlir-lsp-server/MlirLspServerMain.h"
17#include "clang/CIR/Dialect/IR/CIRDialect.h"
18
19int main(int argc, char **argv) {
20 mlir::DialectRegistry registry;
21 mlir::registerAllDialects(registry);
22 registry.insert<cir::CIRDialect>();
23 return failed(mlir::MlirLspServerMain(argc, argv, registry));
24}
25

source code of clang/tools/cir-lsp-server/cir-lsp-server.cpp