clang  3.9.0
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
clang::OMPExecutableDirective Class Reference

This is a basic class for representing single OpenMP executable directive. More...

#include <StmtOpenMP.h>

Inheritance diagram for clang::OMPExecutableDirective:
[legend]
Collaboration diagram for clang::OMPExecutableDirective:
[legend]

Classes

class  specific_clause_iterator
 Iterates over a filtered subrange of clauses applied to a directive. More...
 

Public Member Functions

template<typename SpecificClause >
llvm::iterator_range
< specific_clause_iterator
< SpecificClause > > 
getClausesOfKind () const
 
template<typename SpecificClause >
const SpecificClause * getSingleClause () const
 Gets a single clause of the specified kind associated with the current directive iff there is only one clause of this kind (and assertion is fired if there is more than one clause is associated with the directive). More...
 
template<typename SpecificClause >
bool hasClausesOfKind () const
 Returns true if the current directive has one or more clauses of a specific kind. More...
 
SourceLocation getLocStart () const
 Returns starting location of directive kind. More...
 
SourceLocation getLocEnd () const
 Returns ending location of directive. More...
 
void setLocStart (SourceLocation Loc)
 Set starting location of directive kind. More...
 
void setLocEnd (SourceLocation Loc)
 Set ending location of directive. More...
 
unsigned getNumClauses () const
 Get number of clauses. More...
 
OMPClausegetClause (unsigned i) const
 Returns specified clause. More...
 
bool hasAssociatedStmt () const
 Returns true if directive has associated statement. More...
 
StmtgetAssociatedStmt () const
 Returns statement associated with the directive. More...
 
OpenMPDirectiveKind getDirectiveKind () const
 
child_range children ()
 
ArrayRef< OMPClause * > clauses ()
 
ArrayRef< OMPClause * > clauses () const
 

Static Public Member Functions

template<typename SpecificClause >
static llvm::iterator_range
< specific_clause_iterator
< SpecificClause > > 
getClausesOfKind (ArrayRef< OMPClause * > Clauses)
 
static bool classof (const Stmt *S)
 

Protected Member Functions

template<typename T >
 OMPExecutableDirective (const T *, StmtClass SC, OpenMPDirectiveKind K, SourceLocation StartLoc, SourceLocation EndLoc, unsigned NumClauses, unsigned NumChildren)
 Build instance of directive of class K. More...
 
void setClauses (ArrayRef< OMPClause * > Clauses)
 Sets the list of variables for this clause. More...
 
void setAssociatedStmt (Stmt *S)
 Set the associated statement for the directive. More...
 

Friends

class ASTStmtReader
 

Detailed Description

This is a basic class for representing single OpenMP executable directive.

Definition at line 33 of file StmtOpenMP.h.

Constructor & Destructor Documentation

template<typename T >
clang::OMPExecutableDirective::OMPExecutableDirective ( const T *  ,
StmtClass  SC,
OpenMPDirectiveKind  K,
SourceLocation  StartLoc,
SourceLocation  EndLoc,
unsigned  NumClauses,
unsigned  NumChildren 
)
inlineprotected

Build instance of directive of class K.

Parameters
SCStatement class.
KKind of OpenMP directive.
StartLocStarting location of the directive (directive keyword).
EndLocEnding location of the directive.

Definition at line 67 of file StmtOpenMP.h.

Member Function Documentation

child_range clang::OMPExecutableDirective::children ( )
inline

Definition at line 208 of file StmtOpenMP.h.

References hasAssociatedStmt().

static bool clang::OMPExecutableDirective::classof ( const Stmt S)
inlinestatic

Definition at line 203 of file StmtOpenMP.h.

ArrayRef<OMPClause *> clang::OMPExecutableDirective::clauses ( )
inline
ArrayRef<OMPClause *> clang::OMPExecutableDirective::clauses ( ) const
inline

Definition at line 217 of file StmtOpenMP.h.

Stmt* clang::OMPExecutableDirective::getAssociatedStmt ( ) const
inline

Returns statement associated with the directive.

Definition at line 196 of file StmtOpenMP.h.

References hasAssociatedStmt().

Referenced by emitCommonOMPParallelDirective(), emitCommonOMPTeamsDirective(), emitNumTeamsClauseForTargetDirective(), clang::CodeGen::CodeGenFunction::EmitOMPAtomicDirective(), clang::CodeGen::CodeGenFunction::EmitOMPCriticalDirective(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPFirstprivateClause(), clang::CodeGen::CodeGenFunction::EmitOMPMasterDirective(), clang::CodeGen::CodeGenFunction::EmitOMPOrderedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPParallelDirective(), clang::CodeGen::CodeGenFunction::EmitOMPSectionDirective(), clang::CodeGen::CodeGenFunction::EmitOMPSingleDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetDataDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetDirectiveOutlinedFunction(), clang::CodeGen::CodeGenFunction::EmitOMPTargetParallelForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskgroupDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskLoopBasedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTeamsDirective(), emitPrivatesInit(), clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(), clang::CodeGen::emitTaskOutlinedFunction(), emitThreadLimitClauseForTargetDirective(), clang::OMPLoopDirective::getBody(), and clang::TreeTransform< Derived >::TransformOMPExecutableDirective().

OMPClause* clang::OMPExecutableDirective::getClause ( unsigned  i) const
inline

Returns specified clause.

Parameters
iNumber of clause.

Definition at line 190 of file StmtOpenMP.h.

References clauses().

template<typename SpecificClause >
static llvm::iterator_range<specific_clause_iterator<SpecificClause> > clang::OMPExecutableDirective::getClausesOfKind ( ArrayRef< OMPClause * >  Clauses)
inlinestatic
template<typename SpecificClause >
llvm::iterator_range<specific_clause_iterator<SpecificClause> > clang::OMPExecutableDirective::getClausesOfKind ( ) const
inline

Definition at line 138 of file StmtOpenMP.h.

References clauses().

OpenMPDirectiveKind clang::OMPExecutableDirective::getDirectiveKind ( ) const
inline
SourceLocation clang::OMPExecutableDirective::getLocEnd ( ) const
inline
SourceLocation clang::OMPExecutableDirective::getLocStart ( ) const
inline
unsigned clang::OMPExecutableDirective::getNumClauses ( ) const
inline

Get number of clauses.

Definition at line 184 of file StmtOpenMP.h.

Referenced by setClauses().

template<typename SpecificClause >
const SpecificClause* clang::OMPExecutableDirective::getSingleClause ( ) const
inline

Gets a single clause of the specified kind associated with the current directive iff there is only one clause of this kind (and assertion is fired if there is more than one clause is associated with the directive).

Returns nullptr if no clause of this kind is associated with the directive.

Definition at line 148 of file StmtOpenMP.h.

Referenced by emitCommonOMPParallelDirective(), emitNumTeamsClauseForTargetDirective(), clang::CodeGen::CodeGenFunction::EmitOMPAtomicDirective(), clang::CodeGen::CodeGenFunction::EmitOMPCriticalDirective(), clang::CodeGen::CodeGenFunction::EmitOMPDistributeLoop(), clang::CodeGen::CodeGenFunction::EmitOMPFlushDirective(), clang::CodeGen::CodeGenFunction::EmitOMPForDirective(), clang::CodeGen::CodeGenFunction::EmitOMPForSimdDirective(), clang::CodeGen::CodeGenFunction::EmitOMPOrderedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPReductionClauseFinal(), clang::CodeGen::CodeGenFunction::EmitOMPSectionsDirective(), clang::CodeGen::CodeGenFunction::EmitOMPSingleDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetDataDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetEnterDataDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetExitDataDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTargetUpdateDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskBasedDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskDirective(), clang::CodeGen::CodeGenFunction::EmitOMPTaskLoopBasedDirective(), emitSimdlenSafelenClause(), and emitThreadLimitClauseForTargetDirective().

bool clang::OMPExecutableDirective::hasAssociatedStmt ( ) const
inline

Returns true if directive has associated statement.

Definition at line 193 of file StmtOpenMP.h.

Referenced by children(), getAssociatedStmt(), setAssociatedStmt(), and clang::TreeTransform< Derived >::TransformOMPExecutableDirective().

template<typename SpecificClause >
bool clang::OMPExecutableDirective::hasClausesOfKind ( ) const
inline

Returns true if the current directive has one or more clauses of a specific kind.

Definition at line 162 of file StmtOpenMP.h.

void clang::OMPExecutableDirective::setAssociatedStmt ( Stmt S)
inlineprotected
void OMPExecutableDirective::setClauses ( ArrayRef< OMPClause * >  Clauses)
protected
void clang::OMPExecutableDirective::setLocEnd ( SourceLocation  Loc)
inline

Set ending location of directive.

Parameters
LocNew ending location of directive.

Definition at line 181 of file StmtOpenMP.h.

void clang::OMPExecutableDirective::setLocStart ( SourceLocation  Loc)
inline

Set starting location of directive kind.

Parameters
LocNew starting location of directive.

Definition at line 176 of file StmtOpenMP.h.

Friends And Related Function Documentation

friend class ASTStmtReader
friend

Definition at line 34 of file StmtOpenMP.h.


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