clang 23.0.0git
RegisterOpenMPExtensions.cpp
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// Registration for OpenMP extensions as applied to CIR dialect.
10//
11//===----------------------------------------------------------------------===//
12
14#include "mlir/Dialect/OpenMP/OpenMPInterfaces.h"
16
17namespace cir::omp {
18
19void registerOpenMPExtensions(mlir::DialectRegistry &registry) {
20 registry.addExtension(+[](mlir::MLIRContext *ctx, cir::CIRDialect *dialect) {
21 cir::FuncOp::attachInterface<
22 mlir::omp::DeclareTargetDefaultModel<cir::FuncOp>>(*ctx);
23 });
24}
25
26} // namespace cir::omp
void registerOpenMPExtensions(mlir::DialectRegistry &registry)