MLIR 23.0.0git
OpenACCVariableInfo.h
Go to the documentation of this file.
1//===- OpenACCVariableInfo.h - OpenACC Variable Info Attr -------*- 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// This file defines the VariableInfoAttr base class and the IsVariableInfo
10// trait.
11//
12// Any dialect can define Language-specific variable metadata attribute by
13// manually attaching the IsVariableInfo trait and using VariableInfoAttr as
14// the baseCppClass.
15//
16//===----------------------------------------------------------------------===//
17
18#ifndef MLIR_DIALECT_OPENACC_OPENACCVARIABLEINFO_H
19#define MLIR_DIALECT_OPENACC_OPENACCVARIABLEINFO_H
20
21#include "mlir/IR/Attributes.h"
22
23namespace mlir {
24namespace acc {
25namespace AttributeTrait {
26/// Trait attached to attributes that are OpenACC variable info attributes.
27template <typename ConcreteType>
29 : public mlir::AttributeTrait::TraitBase<ConcreteType, IsVariableInfo> {};
30} // namespace AttributeTrait
31
32/// Base attribute class for language-specific variable information carried
33/// through the OpenACC type interface helpers.
35public:
37
41};
42
43} // namespace acc
44} // namespace mlir
45
46#endif // MLIR_DIALECT_OPENACC_OPENACCVARIABLEINFO_H
Attributes are known-constant values of operations.
Definition Attributes.h:25
constexpr Attribute()=default
bool hasTrait()
Returns true if the type was registered with a particular trait.
Definition Attributes.h:92
Base attribute class for language-specific variable information carried through the OpenACC type inte...
static bool classof(mlir::Attribute attr)
detail::StorageUserTraitBase< ConcreteType, TraitType > TraitBase
This class represents the base of an attribute trait.
Definition Attributes.h:242
Include the generated interface declarations.
Trait attached to attributes that are OpenACC variable info attributes.