FLANG
PointerModels.h
1//===-- Tools/PointerModels.h --------------------- *-C++-*-===//
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 FORTRAN_TOOLS_POINTER_MODELS_H
10#define FORTRAN_TOOLS_POINTER_MODELS_H
11
12#include "mlir/Dialect/OpenACC/OpenACC.h"
13#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
14
17
18template <typename T>
20 : public mlir::omp::PointerLikeType::ExternalModel<
21 OpenMPPointerLikeModel<T>, T> {
22 mlir::Type getElementType(mlir::Type pointer) const {
23 return mlir::cast<T>(pointer).getElementType();
24 }
25};
26
27template <typename T>
29 : public mlir::acc::PointerLikeType::ExternalModel<
30 OpenACCPointerLikeModel<T>, T> {
31 mlir::Type getElementType(mlir::Type pointer) const {
32 return mlir::cast<T>(pointer).getElementType();
33 }
34};
35
36#endif // FORTRAN_TOOLS_POINTER_MODELS_H
Definition: PointerModels.h:30
Definition: PointerModels.h:21