clang  14.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::OMPInitClause Class Referencefinal

This represents the 'init' clause in '#pragma omp ...' directives. More...

#include "clang/AST/OpenMPClause.h"

Inheritance diagram for clang::OMPInitClause:
Inheritance graph
[legend]
Collaboration diagram for clang::OMPInitClause:
Collaboration graph
[legend]

Public Types

using prefs_iterator = MutableArrayRef< Expr * >::iterator
 
using const_prefs_iterator = ArrayRef< const Expr * >::iterator
 
using prefs_range = llvm::iterator_range< prefs_iterator >
 
using const_prefs_range = llvm::iterator_range< const_prefs_iterator >
 
- Public Types inherited from clang::OMPVarListClause< OMPInitClause >
using varlist_iterator = MutableArrayRef< Expr * >::iterator
 
using varlist_const_iterator = ArrayRef< const Expr * >::iterator
 
using varlist_range = llvm::iterator_range< varlist_iterator >
 
using varlist_const_range = llvm::iterator_range< varlist_const_iterator >
 
- Public Types inherited from clang::OMPClause
using child_iterator = StmtIterator
 
using const_child_iterator = ConstStmtIterator
 
using child_range = llvm::iterator_range< child_iterator >
 
using const_child_range = llvm::iterator_range< const_child_iterator >
 

Public Member Functions

SourceLocation getVarLoc () const
 Returns the location of the interop variable. More...
 
ExprgetInteropVar ()
 Returns the interop variable. More...
 
const ExprgetInteropVar () const
 
bool getIsTarget () const
 Returns true is interop-type 'target' is used. More...
 
bool getIsTargetSync () const
 Returns true is interop-type 'targetsync' is used. More...
 
child_range children ()
 
const_child_range children () const
 
child_range used_children ()
 
const_child_range used_children () const
 
prefs_range prefs ()
 
const_prefs_range prefs () const
 
- Public Member Functions inherited from clang::OMPVarListClause< OMPInitClause >
ArrayRef< const Expr * > getVarRefs () const
 Fetches list of all variables in the clause. More...
 
unsigned varlist_size () const
 
bool varlist_empty () const
 
varlist_range varlists ()
 
varlist_const_range varlists () const
 
varlist_iterator varlist_begin ()
 
varlist_const_iterator varlist_begin () const
 
varlist_iterator varlist_end ()
 
varlist_const_iterator varlist_end () const
 
void setLParenLoc (SourceLocation Loc)
 Sets the location of '('. More...
 
SourceLocation getLParenLoc () const
 Returns the location of '('. More...
 
- Public Member Functions inherited from clang::OMPClause
SourceLocation getBeginLoc () const
 Returns the starting location of the clause. More...
 
SourceLocation getEndLoc () const
 Returns the ending location of the clause. More...
 
void setLocStart (SourceLocation Loc)
 Sets the starting location of the clause. More...
 
void setLocEnd (SourceLocation Loc)
 Sets the ending location of the clause. More...
 
OpenMPClauseKind getClauseKind () const
 Returns kind of OpenMP clause (private, shared, reduction, etc.). More...
 
bool isImplicit () const
 
child_range children ()
 
const_child_range children () const
 
child_range used_children ()
 Get the iterator range for the expressions used in the clauses. More...
 
const_child_range used_children () const
 

Static Public Member Functions

static OMPInitClauseCreate (const ASTContext &C, Expr *InteropVar, ArrayRef< Expr * > PrefExprs, bool IsTarget, bool IsTargetSync, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
 Creates a fully specified clause. More...
 
static OMPInitClauseCreateEmpty (const ASTContext &C, unsigned N)
 Creates an empty clause with N expressions. More...
 
static bool classof (const OMPClause *T)
 
- Static Public Member Functions inherited from clang::OMPClause
static bool classof (const OMPClause *)
 

Friends

class OMPClauseReader
 

Additional Inherited Members

- Protected Member Functions inherited from clang::OMPVarListClause< OMPInitClause >
 OMPVarListClause (OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, unsigned N)
 Build a clause with N variables. More...
 
MutableArrayRef< Expr * > getVarRefs ()
 Fetches list of variables associated with this clause. More...
 
void setVarRefs (ArrayRef< Expr * > VL)
 Sets the list of variables for this clause. More...
 
- Protected Member Functions inherited from clang::OMPClause
 OMPClause (OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation EndLoc)
 

Detailed Description

This represents the 'init' clause in '#pragma omp ...' directives.

#pragma omp interop init(target:obj)

Definition at line 7483 of file OpenMPClause.h.

Member Typedef Documentation

◆ const_prefs_iterator

Definition at line 7582 of file OpenMPClause.h.

◆ const_prefs_range

Definition at line 7584 of file OpenMPClause.h.

◆ prefs_iterator

Definition at line 7581 of file OpenMPClause.h.

◆ prefs_range

using clang::OMPInitClause::prefs_range = llvm::iterator_range<prefs_iterator>

Definition at line 7583 of file OpenMPClause.h.

Member Function Documentation

◆ children() [1/2]

child_range clang::OMPInitClause::children ( )
inline

◆ children() [2/2]

const_child_range clang::OMPInitClause::children ( ) const
inline

Definition at line 7569 of file OpenMPClause.h.

References children().

◆ classof()

static bool clang::OMPInitClause::classof ( const OMPClause T)
inlinestatic

Definition at line 7596 of file OpenMPClause.h.

References clang::OMPClause::getClauseKind().

◆ Create()

OMPInitClause * OMPInitClause::Create ( const ASTContext C,
Expr InteropVar,
ArrayRef< Expr * >  PrefExprs,
bool  IsTarget,
bool  IsTargetSync,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  VarLoc,
SourceLocation  EndLoc 
)
static

Creates a fully specified clause.

Parameters
CAST context.
InteropVarThe interop variable.
PrefExprsThe list of preference expressions.
IsTargetUses the 'target' interop-type.
IsTargetSyncUses the 'targetsync' interop-type.
StartLocStarting location of the clause.
LParenLocLocation of '('.
VarLocLocation of the interop variable.
EndLocEnding location of the clause.

Definition at line 1568 of file OpenMPClause.cpp.

Referenced by clang::Sema::ActOnOpenMPInitClause().

◆ CreateEmpty()

OMPInitClause * OMPInitClause::CreateEmpty ( const ASTContext C,
unsigned  N 
)
static

Creates an empty clause with N expressions.

Parameters
CAST context.
NNumber of expression items.

Definition at line 1584 of file OpenMPClause.cpp.

Referenced by clang::OMPClauseReader::readClause().

◆ getInteropVar() [1/2]

Expr* clang::OMPInitClause::getInteropVar ( )
inline

Returns the interop variable.

Definition at line 7555 of file OpenMPClause.h.

References clang::OMPVarListClause< OMPInitClause >::varlist_begin().

◆ getInteropVar() [2/2]

const Expr* clang::OMPInitClause::getInteropVar ( ) const
inline

◆ getIsTarget()

bool clang::OMPInitClause::getIsTarget ( ) const
inline

Returns true is interop-type 'target' is used.

Definition at line 7559 of file OpenMPClause.h.

◆ getIsTargetSync()

bool clang::OMPInitClause::getIsTargetSync ( ) const
inline

Returns true is interop-type 'targetsync' is used.

Definition at line 7562 of file OpenMPClause.h.

◆ getVarLoc()

SourceLocation clang::OMPInitClause::getVarLoc ( ) const
inline

Returns the location of the interop variable.

Definition at line 7552 of file OpenMPClause.h.

◆ prefs() [1/2]

prefs_range clang::OMPInitClause::prefs ( )
inline

◆ prefs() [2/2]

const_prefs_range clang::OMPInitClause::prefs ( ) const
inline

Definition at line 7591 of file OpenMPClause.h.

References prefs().

◆ used_children() [1/2]

child_range clang::OMPInitClause::used_children ( )
inline

Definition at line 7574 of file OpenMPClause.h.

◆ used_children() [2/2]

const_child_range clang::OMPInitClause::used_children ( ) const
inline

Definition at line 7577 of file OpenMPClause.h.

Friends And Related Function Documentation

◆ OMPClauseReader

friend class OMPClauseReader
friend

Definition at line 7486 of file OpenMPClause.h.


The documentation for this class was generated from the following files: