clang 23.0.0git
OMPThreadLimitClause Class Referencefinal

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

#include "clang/AST/OpenMPClause.h"

Inheritance diagram for OMPThreadLimitClause:
[legend]

Public Member Functions

void setLParenLoc (SourceLocation Loc)
 Sets the location of '('.
SourceLocation getLParenLoc () const
 Returns the location of '('.
ArrayRef< Expr * > getThreadLimit ()
 Return ThreadLimit expressions.
ArrayRef< Expr * > getThreadLimit () const
 Return ThreadLimit expressions.
child_range children ()
const_child_range children () const
child_range used_children ()
const_child_range used_children () const

Static Public Member Functions

static OMPThreadLimitClauseCreate (const ASTContext &C, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, Stmt *PreInit)
 Creates clause with a list of variables VL.
static OMPThreadLimitClauseCreateEmpty (const ASTContext &C, unsigned N)
 Creates an empty clause with N variables.
static bool classof (const OMPClause *T)

Detailed Description

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

#pragma omp teams thread_limit(n)

In this example directive '#pragma omp teams' has clause 'thread_limit' with single expression 'n'.

When 'ompx_bare' clause exists on a 'target' directive, 'thread_limit' clause can accept up to three expressions.

#pragma omp target teams ompx_bare thread_limit(x, y, z)

Definition at line 6970 of file OpenMPClause.h.

Member Function Documentation

◆ children() [1/2]

child_range OMPThreadLimitClause::children ( )
inline

Definition at line 7027 of file OpenMPClause.h.

Referenced by children().

◆ children() [2/2]

const_child_range OMPThreadLimitClause::children ( ) const
inline

Definition at line 7032 of file OpenMPClause.h.

References children().

◆ classof()

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

Definition at line 7043 of file OpenMPClause.h.

◆ Create()

OMPThreadLimitClause * OMPThreadLimitClause::Create ( const ASTContext & C,
OpenMPDirectiveKind CaptureRegion,
SourceLocation StartLoc,
SourceLocation LParenLoc,
SourceLocation EndLoc,
ArrayRef< Expr * > VL,
Stmt * PreInit )
static

Creates clause with a list of variables VL.

Parameters
CAST context.
StartLocStarting location of the clause.
LParenLocLocation of '('.
EndLocEnding location of the clause.
VLList of references to the variables.
PreInit

Definition at line 1909 of file OpenMPClause.cpp.

References clang::C.

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

◆ CreateEmpty()

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

Creates an empty clause with N variables.

Parameters
CAST context.
NThe number of variables.

Definition at line 1921 of file OpenMPClause.cpp.

References clang::C.

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

◆ getLParenLoc()

SourceLocation OMPThreadLimitClause::getLParenLoc ( ) const
inline

Returns the location of '('.

Definition at line 7017 of file OpenMPClause.h.

◆ getThreadLimit() [1/2]

ArrayRef< Expr * > OMPThreadLimitClause::getThreadLimit ( )
inline

Return ThreadLimit expressions.

Definition at line 7020 of file OpenMPClause.h.

Referenced by getThreadLimit().

◆ getThreadLimit() [2/2]

ArrayRef< Expr * > OMPThreadLimitClause::getThreadLimit ( ) const
inline

Return ThreadLimit expressions.

Definition at line 7023 of file OpenMPClause.h.

References getThreadLimit().

◆ setLParenLoc()

void OMPThreadLimitClause::setLParenLoc ( SourceLocation Loc)
inline

Sets the location of '('.

Definition at line 7014 of file OpenMPClause.h.

◆ used_children() [1/2]

child_range OMPThreadLimitClause::used_children ( )
inline

Definition at line 7036 of file OpenMPClause.h.

◆ used_children() [2/2]

const_child_range OMPThreadLimitClause::used_children ( ) const
inline

Definition at line 7039 of file OpenMPClause.h.


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