clang
23.0.0git
include
clang
CIR
InitAllDialects.h
Go to the documentation of this file.
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
// Centralised dialect registration for CIR tools. Every tool that parses or
10
// transforms CIR (cir-opt, cir-lsp-server, -fclangir...) should call
11
// registerAllDialects() instead of registering dialects and extensions
12
// individually, so the dialect surface presented to all tools is always
13
// consistent.
14
//
15
//===----------------------------------------------------------------------===//
16
17
#ifndef CLANG_CIR_INITALLDIALECTS_H
18
#define CLANG_CIR_INITALLDIALECTS_H
19
20
namespace
mlir
{
21
class
DialectRegistry;
22
class
MLIRContext;
23
}
// namespace mlir
24
25
namespace
cir
{
26
27
// Populate \p registry with every dialect and dialect extension required to
28
// parse, verify and transform CIR.
29
void
registerAllDialects
(mlir::DialectRegistry ®istry);
30
31
// Convenience overload that registers the same dialects directly into \p
32
// context for lazy loading.
33
void
registerAllDialects
(mlir::MLIRContext &context);
34
35
}
// namespace cir
36
37
#endif
// CLANG_CIR_INITALLDIALECTS_H
cir
Definition
ABIArgInfo.h:22
cir::registerAllDialects
void registerAllDialects(mlir::DialectRegistry ®istry)
Definition
RegisterAllDialects.cpp:23
mlir
Definition
CIRGenerator.h:33
Generated on
for clang by
1.14.0