clang API Documentation

Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
clang::OMPExecutableDirective Class Reference

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

#include <StmtOpenMP.h>

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

List of all members.

Classes

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

Public Member Functions

const OMPClausegetSingleClause (OpenMPClauseKind K) const
 Gets a single clause of the specified kind K 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 kind K is associated with the directive.
SourceLocation getLocStart () const
 Returns starting location of directive kind.
SourceLocation getLocEnd () const
 Returns ending location of directive.
void setLocStart (SourceLocation Loc)
 Set starting location of directive kind.
void setLocEnd (SourceLocation Loc)
 Set ending location of directive.
unsigned getNumClauses () const
 Get number of clauses.
OMPClausegetClause (unsigned i) const
 Returns specified clause.
bool hasAssociatedStmt () const
 Returns true if directive has associated statement.
StmtgetAssociatedStmt () const
 Returns statement associated with the directive.
OpenMPDirectiveKind getDirectiveKind () const
child_range children ()
ArrayRef< OMPClause * > clauses ()
ArrayRef< OMPClause * > clauses () const

Static Public Member Functions

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.
void setClauses (ArrayRef< OMPClause * > Clauses)
 Sets the list of variables for this clause.
void setAssociatedStmt (Stmt *S)
 Set the associated statement for the directive.

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 
) [inline, protected]

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

Reimplemented from clang::Stmt.

Definition at line 179 of file StmtOpenMP.h.

References hasAssociatedStmt().

static bool clang::OMPExecutableDirective::classof ( const Stmt S) [inline, static]
ArrayRef<OMPClause *> clang::OMPExecutableDirective::clauses ( ) const [inline]

Definition at line 188 of file StmtOpenMP.h.

Returns specified clause.

Parameters:
iNumber of clause.

Definition at line 161 of file StmtOpenMP.h.

References clauses().

Returns ending location of directive.

Reimplemented from clang::Stmt.

Definition at line 141 of file StmtOpenMP.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitOMPCriticalDirective(), and clang::TreeTransform< Derived >::TransformOMPExecutableDirective().

Get number of clauses.

Definition at line 155 of file StmtOpenMP.h.

Referenced by setClauses().

Gets a single clause of the specified kind K 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 kind K is associated with the directive.

Definition at line 1445 of file Stmt.cpp.

References AttributeLangSupport::C, and clauses().

Referenced by EmitOMPParallelCall(), and clang::CodeGen::CodeGenFunction::EmitOMPParallelDirective().

Returns true if directive has associated statement.

Definition at line 164 of file StmtOpenMP.h.

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

void clang::OMPExecutableDirective::setAssociatedStmt ( Stmt S) [inline, protected]
void OMPExecutableDirective::setClauses ( ArrayRef< OMPClause * >  Clauses) [protected]

Set ending location of directive.

Parameters:
LocNew ending location of directive.

Definition at line 152 of file StmtOpenMP.h.

Set starting location of directive kind.

Parameters:
LocNew starting location of directive.

Definition at line 147 of file StmtOpenMP.h.


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

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