14#ifndef LLVM_CLANG_AST_DECLOPENACC_H
15#define LLVM_CLANG_AST_DECLOPENACC_H
21#include "llvm/ADT/STLExtras.h"
45 :
Decl(DeclKind, DC, StartLoc), DirKind(K), DirectiveLoc(DirLoc),
51 assert(Clauses.empty() &&
"Cannot change clause list");
67class OpenACCDeclareDecl final
69 private llvm::TrailingObjects<OpenACCDeclareDecl, const OpenACCClause *> {
70 friend TrailingObjects;
74 OpenACCDeclareDecl(
unsigned NumClauses)
76 std::uninitialized_value_construct_n(getTrailingObjects(), NumClauses);
84 StartLoc, DirLoc, EndLoc) {
86 llvm::uninitialized_copy(Clauses, getTrailingObjects());
93 SourceLocation StartLoc,
94 SourceLocation DirLoc,
95 SourceLocation EndLoc,
97 static OpenACCDeclareDecl *
105class OpenACCRoutineDecl final
107 private llvm::TrailingObjects<OpenACCRoutineDecl, const OpenACCClause *> {
108 friend TrailingObjects;
112 Expr *FuncRef =
nullptr;
115 OpenACCRoutineDecl(
unsigned NumClauses)
117 std::uninitialized_value_construct_n(getTrailingObjects(), NumClauses);
127 StartLoc, DirLoc, EndLoc),
128 FuncRef(FuncRef), ParensLoc(LParenLoc, RParenLoc) {
130 "Cannot represent implicit name with this declaration");
132 llvm::uninitialized_copy(Clauses, getTrailingObjects());
137 static OpenACCRoutineDecl *
139 SourceLocation DirLoc, SourceLocation LParenLoc, Expr *FuncRef,
140 SourceLocation RParenLoc, SourceLocation EndLoc,
142 static OpenACCRoutineDecl *
Defines the clang::ASTContext interface.
Defines some OpenACC-specific enums and functions.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Decl - This represents one declaration (or definition), e.g.
Kind
Lists the kind of concrete classes of Decl.
SourceLocation getLocation() const
This represents one expression.
static bool classofKind(Kind K)
OpenACCDirectiveKind getDirectiveKind() const
friend class ASTDeclReader
void setClauseList(MutableArrayRef< const OpenACCClause * > NewClauses)
OpenACCConstructDecl(Kind DeclKind, DeclContext *DC, OpenACCDirectiveKind K, SourceLocation StartLoc, SourceLocation DirLoc, SourceLocation EndLoc)
static bool classof(const Decl *D)
ArrayRef< const OpenACCClause * > clauses() const
OpenACCConstructDecl(Kind DeclKind)
friend class ASTDeclWriter
SourceLocation getDirectiveLoc() const
virtual SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
static OpenACCDeclareDecl * CreateDeserialized(ASTContext &Ctx, GlobalDeclID ID, unsigned NumClauses)
static bool classofKind(Kind K)
friend class ASTDeclReader
friend class ASTDeclWriter
static bool classof(const Decl *D)
Expr * getFunctionReference()
SourceLocation getRParenLoc() const
static OpenACCRoutineDecl * CreateDeserialized(ASTContext &Ctx, GlobalDeclID ID, unsigned NumClauses)
static bool classof(const Decl *D)
friend class ASTDeclReader
const Expr * getFunctionReference() const
friend class ASTDeclWriter
static bool classofKind(Kind K)
SourceLocation getLParenLoc() const
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
A trivial tuple used to represent a source range.
The JSON file list parser is used to communicate input to InstallAPI.
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
A placeholder type used to construct an empty shell of a decl-derived type that will be filled in lat...