clang 23.0.0git
clang::OMPCountsClause Class Referencefinal

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

#include "clang/AST/OpenMPClause.h"

Inheritance diagram for clang::OMPCountsClause:
[legend]

Public Member Functions

SourceLocation getLParenLoc () const
 Returns the location of '('.
unsigned getNumCounts () const
 Returns the number of list items.
std::optional< unsignedgetOmpFillIndex () const
SourceLocation getOmpFillLoc () const
bool hasOmpFill () const
MutableArrayRef< Expr * > getCountsRefs ()
 Returns the count expressions.
ArrayRef< Expr * > getCountsRefs () 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 OMPCountsClauseCreate (const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > Counts, std::optional< unsigned > FillIdx, SourceLocation FillLoc)
 Build a 'counts' AST node.
static OMPCountsClauseCreateEmpty (const ASTContext &C, unsigned NumCounts)
 Build an empty 'counts' AST node for deserialization.
static bool classof (const OMPClause *T)
Static Public Member Functions inherited from clang::OMPClause
static bool classof (const OMPClause *)

Friends

class OMPClauseReader
class llvm::TrailingObjects< OMPCountsClause, Expr * >

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 the 'counts' clause in the '#pragma omp split' directive.

#pragma omp split counts(3, omp_fill, 2)
for (int i = 0; i < n; ++i) { ... }

Definition at line 1033 of file OpenMPClause.h.

Member Function Documentation

◆ children() [1/2]

child_range clang::OMPCountsClause::children ( )
inline

Definition at line 1105 of file OpenMPClause.h.

References getCountsRefs().

◆ children() [2/2]

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

Definition at line 1110 of file OpenMPClause.h.

References getCountsRefs().

◆ classof()

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

Definition at line 1122 of file OpenMPClause.h.

References clang::OMPClause::OMPClause().

◆ Create()

OMPCountsClause * OMPCountsClause::Create ( const ASTContext & C,
SourceLocation StartLoc,
SourceLocation LParenLoc,
SourceLocation EndLoc,
ArrayRef< Expr * > Counts,
std::optional< unsigned > FillIdx,
SourceLocation FillLoc )
static

Build a 'counts' AST node.

Parameters
CContext of the AST.
StartLocLocation of the 'counts' identifier.
LParenLocLocation of '('.
EndLocLocation of ')'.
CountsContent of the clause.

Definition at line 991 of file OpenMPClause.cpp.

References clang::C, and CreateEmpty().

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

◆ CreateEmpty()

OMPCountsClause * OMPCountsClause::CreateEmpty ( const ASTContext & C,
unsigned NumCounts )
static

Build an empty 'counts' AST node for deserialization.

Parameters
CContext of the AST.
NumCountsNumber of items in the clause.

Definition at line 1005 of file OpenMPClause.cpp.

References clang::C.

Referenced by Create(), and clang::OMPClauseReader::readClause().

◆ getCountsRefs() [1/2]

MutableArrayRef< Expr * > clang::OMPCountsClause::getCountsRefs ( )
inline

Returns the count expressions.

Definition at line 1098 of file OpenMPClause.h.

Referenced by children(), and children().

◆ getCountsRefs() [2/2]

ArrayRef< Expr * > clang::OMPCountsClause::getCountsRefs ( ) const
inline

Definition at line 1101 of file OpenMPClause.h.

◆ getLParenLoc()

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

Returns the location of '('.

Definition at line 1088 of file OpenMPClause.h.

◆ getNumCounts()

unsigned clang::OMPCountsClause::getNumCounts ( ) const
inline

Returns the number of list items.

Definition at line 1091 of file OpenMPClause.h.

◆ getOmpFillIndex()

std::optional< unsigned > clang::OMPCountsClause::getOmpFillIndex ( ) const
inline

Definition at line 1093 of file OpenMPClause.h.

◆ getOmpFillLoc()

SourceLocation clang::OMPCountsClause::getOmpFillLoc ( ) const
inline

Definition at line 1094 of file OpenMPClause.h.

◆ hasOmpFill()

bool clang::OMPCountsClause::hasOmpFill ( ) const
inline

Definition at line 1095 of file OpenMPClause.h.

◆ used_children() [1/2]

child_range clang::OMPCountsClause::used_children ( )
inline

Definition at line 1115 of file OpenMPClause.h.

◆ used_children() [2/2]

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

Definition at line 1118 of file OpenMPClause.h.

◆ llvm::TrailingObjects< OMPCountsClause, Expr * >

friend class llvm::TrailingObjects< OMPCountsClause, Expr * >
friend

Definition at line 1036 of file OpenMPClause.h.

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

◆ OMPClauseReader

friend class OMPClauseReader
friend

Definition at line 1036 of file OpenMPClause.h.

Referenced by llvm::TrailingObjects< OMPCountsClause, Expr * >.


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