xref: /llvm-project/mlir/include/mlir/Dialect/OpenMP/OpenMPTypeInterfaces.td (revision 81767f52f49339be2c78fc9bf831856b9f57e2f0)
1//===-- OpenMPTypeInterfaces.td - OpenMP type interfaces ---*- tablegen -*-===//
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#ifndef OPENMP_TYPE_INTERFACES
10#define OPENMP_TYPE_INTERFACES
11
12include "mlir/IR/OpBase.td"
13
14def OpenMP_PointerLikeTypeInterface : TypeInterface<"PointerLikeType"> {
15  let cppNamespace = "::mlir::omp";
16
17  let description = [{
18    An interface for pointer-like types suitable to contain a value that OpenMP
19    specification refers to as variable.
20  }];
21
22  let methods = [
23    InterfaceMethod<
24      /*description=*/[{
25        Returns the pointee type or null if the pointer has no pointee type
26      }],
27      /*retTy=*/"::mlir::Type",
28      /*methodName=*/"getElementType"
29    >,
30  ];
31}
32
33#endif // OPENMP_TYPE_INTERFACES
34