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");
69 private llvm::TrailingObjects<OpenACCDeclareDecl, const OpenACCClause *> {
70 friend TrailingObjects;
76 std::uninitialized_value_construct_n(getTrailingObjects(), NumClauses);
84 StartLoc, DirLoc, EndLoc) {
86 llvm::uninitialized_copy(Clauses, getTrailingObjects());
92 static OpenACCDeclareDecl *
Create(ASTContext &Ctx, DeclContext *DC,
93 SourceLocation StartLoc,
94 SourceLocation DirLoc,
95 SourceLocation EndLoc,
96 ArrayRef<const OpenACCClause *> Clauses);
97 static OpenACCDeclareDecl *
107 private llvm::TrailingObjects<OpenACCRoutineDecl, const OpenACCClause *> {
108 friend TrailingObjects;
112 Expr *FuncRef =
nullptr;
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 *
138 Create(ASTContext &Ctx, DeclContext *DC, SourceLocation StartLoc,
139 SourceLocation DirLoc, SourceLocation LParenLoc, Expr *FuncRef,
140 SourceLocation RParenLoc, SourceLocation EndLoc,
141 ArrayRef<const OpenACCClause *> Clauses);
142 static OpenACCRoutineDecl *
Defines the clang::ASTContext interface.
Defines some OpenACC-specific enums and functions.
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
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)
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)
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)
const Expr * getFunctionReference() const
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.
SourceLocation getEnd() const
SourceLocation getBegin() const
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...