Morris Hafner 1ae307a709
[CIR] Add cir-translate and cir-lsp-server tools (#131181)
Adds two new clang tools to the tree.

* cir-translate: Translates CIR to LLVM, similar to mlir-translate
* cir-lsp-server: Implementation of the Language Server Protocol for
ClangIR, similar to fir-lsp-server

---------

Co-authored-by: Morris Hafner <mhafner@nvidia.com>
2025-03-18 09:51:13 -07:00

25 lines
901 B
C++

//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// A language server for ClangIR
//
//===----------------------------------------------------------------------===//
#include "mlir/IR/Dialect.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/InitAllDialects.h"
#include "mlir/Tools/mlir-lsp-server/MlirLspServerMain.h"
#include "clang/CIR/Dialect/IR/CIRDialect.h"
int main(int argc, char **argv) {
mlir::DialectRegistry registry;
mlir::registerAllDialects(registry);
registry.insert<cir::CIRDialect>();
return failed(mlir::MlirLspServerMain(argc, argv, registry));
}