clang 23.0.0git
OMPDependClause Class Referencefinal

This represents implicit clause 'depend' for the '#pragma omp task' directive. More...

#include "clang/AST/OpenMPClause.h"

Inheritance diagram for OMPDependClause:
[legend]

Classes

struct  DependDataTy

Public Member Functions

OpenMPDependClauseKind getDependencyKind () const
 Get dependency type.
SourceLocation getDependencyLoc () const
 Get dependency type location.
SourceLocation getColonLoc () const
 Get colon location.
SourceLocation getOmpAllMemoryLoc () const
 Get 'omp_all_memory' location.
ExprgetModifier ()
 Return optional depend modifier.
const Expr * getModifier () const
unsigned getNumLoops () const
 Get number of loops associated with the clause.
void setLoopData (unsigned NumLoop, Expr *Cnt)
 Set the loop data for the depend clauses with 'sink|source' kind of dependency.
ExprgetLoopData (unsigned NumLoop)
 Get the loop data.
const ExprgetLoopData (unsigned NumLoop) const
child_range children ()
const_child_range children () const
child_range used_children ()
const_child_range used_children () const

Static Public Member Functions

static OMPDependClauseCreate (const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, DependDataTy Data, Expr *DepModifier, ArrayRef< Expr * > VL, unsigned NumLoops)
 Creates clause with a list of variables VL.
static OMPDependClauseCreateEmpty (const ASTContext &C, unsigned N, unsigned NumLoops)
 Creates an empty clause with N variables.
static bool classof (const OMPClause *T)

Friends

class OMPClauseReader

Detailed Description

This represents implicit clause 'depend' for the '#pragma omp task' directive.

#pragma omp task depend(in:a,b)

In this example directive '#pragma omp task' with clause 'depend' with the variables 'a' and 'b' with dependency 'in'.

Definition at line 5573 of file OpenMPClause.h.

Member Function Documentation

◆ children() [1/2]

child_range OMPDependClause::children ( )
inline

Definition at line 5697 of file OpenMPClause.h.

Referenced by children().

◆ children() [2/2]

const_child_range OMPDependClause::children ( ) const
inline

Definition at line 5702 of file OpenMPClause.h.

References children().

◆ classof()

bool OMPDependClause::classof ( const OMPClause * T)
inlinestatic

Definition at line 5713 of file OpenMPClause.h.

◆ Create()

OMPDependClause * OMPDependClause::Create ( const ASTContext & C,
SourceLocation StartLoc,
SourceLocation LParenLoc,
SourceLocation EndLoc,
DependDataTy Data,
Expr * DepModifier,
ArrayRef< Expr * > VL,
unsigned NumLoops )
static

Creates clause with a list of variables VL.

Parameters
CAST context.
StartLocStarting location of the clause.
LParenLocLocation of '('.
EndLocEnding location of the clause.
DataDependency type and source locations.
VLList of references to the variables.
NumLoopsNumber of loops that is associated with this depend clause.

Definition at line 1112 of file OpenMPClause.cpp.

References clang::C.

Referenced by clang::SemaOpenMP::ActOnOpenMPDependClause().

◆ CreateEmpty()

OMPDependClause * OMPDependClause::CreateEmpty ( const ASTContext & C,
unsigned N,
unsigned NumLoops )
static

Creates an empty clause with N variables.

Parameters
CAST context.
NThe number of variables.
NumLoopsNumber of loops that is associated with this depend clause.

Definition at line 1132 of file OpenMPClause.cpp.

References clang::C.

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

◆ getColonLoc()

SourceLocation OMPDependClause::getColonLoc ( ) const
inline

Get colon location.

Definition at line 5675 of file OpenMPClause.h.

◆ getDependencyKind()

OpenMPDependClauseKind OMPDependClause::getDependencyKind ( ) const
inline

Get dependency type.

Definition at line 5669 of file OpenMPClause.h.

Referenced by getLoopData(), getLoopData(), and setLoopData().

◆ getDependencyLoc()

SourceLocation OMPDependClause::getDependencyLoc ( ) const
inline

Get dependency type location.

Definition at line 5672 of file OpenMPClause.h.

◆ getLoopData() [1/2]

Expr * OMPDependClause::getLoopData ( unsigned NumLoop)

Get the loop data.

Definition at line 1150 of file OpenMPClause.cpp.

References getDependencyKind().

◆ getLoopData() [2/2]

const Expr * OMPDependClause::getLoopData ( unsigned NumLoop) const

Definition at line 1160 of file OpenMPClause.cpp.

References getDependencyKind().

◆ getModifier() [1/2]

Expr * OMPDependClause::getModifier ( )

Return optional depend modifier.

Definition at line 1173 of file OpenMPClause.cpp.

Referenced by getModifier().

◆ getModifier() [2/2]

const Expr * OMPDependClause::getModifier ( ) const
inline

Definition at line 5682 of file OpenMPClause.h.

References getModifier().

◆ getNumLoops()

unsigned OMPDependClause::getNumLoops ( ) const
inline

Get number of loops associated with the clause.

Definition at line 5687 of file OpenMPClause.h.

◆ getOmpAllMemoryLoc()

SourceLocation OMPDependClause::getOmpAllMemoryLoc ( ) const
inline

Get 'omp_all_memory' location.

Definition at line 5678 of file OpenMPClause.h.

◆ setLoopData()

void OMPDependClause::setLoopData ( unsigned NumLoop,
Expr * Cnt )

Set the loop data for the depend clauses with 'sink|source' kind of dependency.

Definition at line 1140 of file OpenMPClause.cpp.

References getDependencyKind().

◆ used_children() [1/2]

child_range OMPDependClause::used_children ( )
inline

Definition at line 5706 of file OpenMPClause.h.

◆ used_children() [2/2]

const_child_range OMPDependClause::used_children ( ) const
inline

Definition at line 5709 of file OpenMPClause.h.

◆ OMPClauseReader

friend class OMPClauseReader
friend

Definition at line 5576 of file OpenMPClause.h.

References OMPClauseReader.

Referenced by OMPClauseReader.


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