clang 22.0.0git
clang::OMPOrderedClause Class Referencefinal

This represents 'ordered' clause in the '#pragma omp ...' directive. More...

#include "clang/AST/OpenMPClause.h"

Inheritance diagram for clang::OMPOrderedClause:
[legend]

Public Member Functions

void setLParenLoc (SourceLocation Loc)
 Sets the location of '('.
SourceLocation getLParenLoc () const
 Returns the location of '('.
ExprgetNumForLoops () const
 Return the number of associated for-loops.
void setLoopNumIterations (unsigned NumLoop, Expr *NumIterations)
 Set number of iterations for the specified loop.
ArrayRef< Expr * > getLoopNumIterations () const
 Get number of iterations for all the loops.
void setLoopCounter (unsigned NumLoop, Expr *Counter)
 Set loop counter for the specified loop.
ExprgetLoopCounter (unsigned NumLoop)
 Get loops counter for the specified loop.
const ExprgetLoopCounter (unsigned NumLoop) const
child_range children ()
const_child_range children () const
child_range used_children ()
const_child_range used_children () const
Public Member Functions inherited from clang::OMPClause
SourceLocation getBeginLoc () const
 Returns the starting location of the clause.
SourceLocation getEndLoc () const
 Returns the ending location of the clause.
void setLocStart (SourceLocation Loc)
 Sets the starting location of the clause.
void setLocEnd (SourceLocation Loc)
 Sets the ending location of the clause.
OpenMPClauseKind getClauseKind () const
 Returns kind of OpenMP clause (private, shared, reduction, etc.).
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.
const_child_range used_children () const

Static Public Member Functions

static OMPOrderedClauseCreate (const ASTContext &C, Expr *Num, unsigned NumLoops, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
 Build 'ordered' clause.
static OMPOrderedClauseCreateEmpty (const ASTContext &C, unsigned NumLoops)
 Build an empty clause.
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

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>
Protected Member Functions inherited from clang::OMPClause
 OMPClause (OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation EndLoc)

Detailed Description

This represents 'ordered' clause in the '#pragma omp ...' directive.

#pragma omp for ordered (2)

In this example directive '#pragma omp for' has 'ordered' clause with parameter 2.

Definition at line 2128 of file OpenMPClause.h.

Member Function Documentation

◆ children() [1/2]

child_range clang::OMPOrderedClause::children ( )
inline

Definition at line 2199 of file OpenMPClause.h.

◆ children() [2/2]

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

Definition at line 2201 of file OpenMPClause.h.

◆ classof()

bool clang::OMPOrderedClause::classof ( const OMPClause * T)
inlinestatic

Definition at line 2212 of file OpenMPClause.h.

References clang::OMPClause::OMPClause(), and clang::T.

◆ Create()

OMPOrderedClause * OMPOrderedClause::Create ( const ASTContext & C,
Expr * Num,
unsigned NumLoops,
SourceLocation StartLoc,
SourceLocation LParenLoc,
SourceLocation EndLoc )
static

Build 'ordered' clause.

Parameters
NumExpression, possibly associated with this clause.
NumLoopsNumber of loops, associated with this clause.
StartLocStarting location of the clause.
LParenLocLocation of '('.
EndLocEnding location of the clause.

Definition at line 347 of file OpenMPClause.cpp.

References clang::C, and clang::Num.

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

◆ CreateEmpty()

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

Build an empty clause.

Definition at line 362 of file OpenMPClause.cpp.

References clang::C.

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

◆ getLoopCounter() [1/2]

Expr * OMPOrderedClause::getLoopCounter ( unsigned NumLoop)

Get loops counter for the specified loop.

Definition at line 388 of file OpenMPClause.cpp.

◆ getLoopCounter() [2/2]

const Expr * OMPOrderedClause::getLoopCounter ( unsigned NumLoop) const

Definition at line 393 of file OpenMPClause.cpp.

◆ getLoopNumIterations()

ArrayRef< Expr * > OMPOrderedClause::getLoopNumIterations ( ) const

Get number of iterations for all the loops.

Definition at line 379 of file OpenMPClause.cpp.

◆ getLParenLoc()

SourceLocation clang::OMPOrderedClause::getLParenLoc ( ) const
inline

Returns the location of '('.

Definition at line 2183 of file OpenMPClause.h.

◆ getNumForLoops()

Expr * clang::OMPOrderedClause::getNumForLoops ( ) const
inline

Return the number of associated for-loops.

Definition at line 2186 of file OpenMPClause.h.

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

◆ setLoopCounter()

void OMPOrderedClause::setLoopCounter ( unsigned NumLoop,
Expr * Counter )

Set loop counter for the specified loop.

Definition at line 383 of file OpenMPClause.cpp.

◆ setLoopNumIterations()

void OMPOrderedClause::setLoopNumIterations ( unsigned NumLoop,
Expr * NumIterations )

Set number of iterations for the specified loop.

Definition at line 373 of file OpenMPClause.cpp.

◆ setLParenLoc()

void clang::OMPOrderedClause::setLParenLoc ( SourceLocation Loc)
inline

Sets the location of '('.

Definition at line 2180 of file OpenMPClause.h.

◆ used_children() [1/2]

child_range clang::OMPOrderedClause::used_children ( )
inline

Definition at line 2205 of file OpenMPClause.h.

◆ used_children() [2/2]

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

Definition at line 2208 of file OpenMPClause.h.

◆ OMPClauseReader

friend class OMPClauseReader
friend

Definition at line 2131 of file OpenMPClause.h.

References clang::Num, clang::OMPClause::OMPClause(), and OMPClauseReader.

Referenced by OMPClauseReader.


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