12#ifndef LLVM_CLANG_AST_STMTSYCL_H
13#define LLVM_CLANG_AST_STMTSYCL_H
41 Stmt *OriginalStmt =
nullptr;
42 Stmt *KernelLaunchStmt =
nullptr;
48 :
Stmt(SYCLKernelCallStmtClass), OriginalStmt(CS), KernelLaunchStmt(S),
84 return T->getStmtClass() == SYCLKernelCallStmtClass;
88 return child_range(&OriginalStmt, &OriginalStmt + 1);
100class UnresolvedSYCLKernelCallStmt :
public Stmt {
105 Stmt *OriginalStmt =
nullptr;
109 Expr *KernelLaunchIdExpr =
nullptr;
112 :
Stmt(UnresolvedSYCLKernelCallStmtClass), OriginalStmt(CS),
113 KernelLaunchIdExpr(IdExpr) {}
115 void setOriginalStmt(
CompoundStmt *CS) { OriginalStmt = CS; }
117 void setKernelLaunchIdExpr(Expr *IdExpr) { KernelLaunchIdExpr = IdExpr; }
122 return new (
C) UnresolvedSYCLKernelCallStmt(CS, IdExpr);
126 return new (
C) UnresolvedSYCLKernelCallStmt(
nullptr,
nullptr);
145 return T->getStmtClass() == UnresolvedSYCLKernelCallStmtClass;
148 return child_range(&OriginalStmt, &OriginalStmt + 1);
Defines the clang::ASTContext interface.
Defines the clang::SourceLocation class and associated facilities.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
CompoundStmt - This represents a group of statements like { stmt stmt }.
SourceLocation getBeginLoc() const
SourceLocation getEndLoc() const
This represents one expression.
Represents a partial function definition.
CompoundStmt * getOriginalStmt()
void setOriginalStmt(CompoundStmt *CS)
static bool classof(const Stmt *T)
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation getBeginLoc() const LLVM_READONLY
const OutlinedFunctionDecl * getOutlinedFunctionDecl() const
const CompoundStmt * getOriginalStmt() const
SYCLKernelCallStmt(EmptyShell Empty)
Construct an empty SYCL kernel call statement.
void setKernelLaunchStmt(Stmt *S)
SourceLocation getEndLoc() const LLVM_READONLY
const_child_range children() const
friend class ASTStmtWriter
SYCLKernelCallStmt(CompoundStmt *CS, Stmt *S, OutlinedFunctionDecl *OFD)
Construct a SYCL kernel call statement.
const Stmt * getKernelLaunchStmt() const
OutlinedFunctionDecl * getOutlinedFunctionDecl()
Stmt * getKernelLaunchStmt()
void setOutlinedFunctionDecl(OutlinedFunctionDecl *OFD)
friend class ASTStmtReader
Encodes a location in the source.
A trivial tuple used to represent a source range.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
Stmt(StmtClass SC, EmptyShell)
Construct an empty statement.
llvm::iterator_range< child_iterator > child_range
llvm::iterator_range< const_child_iterator > const_child_range
const CompoundStmt * getOriginalStmt() const
const Expr * getKernelLaunchIdExpr() const
static UnresolvedSYCLKernelCallStmt * CreateEmpty(const ASTContext &C)
Expr * getKernelLaunchIdExpr()
SourceLocation getBeginLoc() const LLVM_READONLY
const_child_range children() const
friend class ASTStmtWriter
CompoundStmt * getOriginalStmt()
friend class ASTStmtReader
static UnresolvedSYCLKernelCallStmt * Create(const ASTContext &C, CompoundStmt *CS, Expr *IdExpr)
SourceLocation getEndLoc() const LLVM_READONLY
static bool classof(const Stmt *T)
The JSON file list parser is used to communicate input to InstallAPI.
U cast(CodeGen::Address addr)
A placeholder type used to construct an empty shell of a type, that will be filled in later (e....