clang API Documentation

Public Member Functions | Static Public Member Functions | Friends
clang::OMPAtomicDirective Class Reference

This represents '#pragma omp atomic' directive. More...

#include <StmtOpenMP.h>

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

List of all members.

Public Member Functions

ExprgetX ()
 Get 'x' part of the associated expression/statement.
const ExprgetX () const
ExprgetV ()
 Get 'v' part of the associated expression/statement.
const ExprgetV () const
ExprgetExpr ()
 Get 'expr' part of the associated expression/statement.
const ExprgetExpr () const

Static Public Member Functions

static OMPAtomicDirectiveCreate (const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef< OMPClause * > Clauses, Stmt *AssociatedStmt, Expr *X, Expr *V, Expr *E)
 Creates directive with a list of Clauses and 'x', 'v' and 'expr' parts of the atomic construct (see Section 2.12.6, atomic Construct, for detailed description of 'x', 'v' and 'expr').
static OMPAtomicDirectiveCreateEmpty (const ASTContext &C, unsigned NumClauses, EmptyShell)
 Creates an empty directive with the place for NumClauses clauses.
static bool classof (const Stmt *T)

Friends

class ASTStmtReader

Detailed Description

This represents '#pragma omp atomic' directive.

 #pragma omp atomic capture

In this example directive '#pragma omp atomic' has clause 'capture'.

Definition at line 1431 of file StmtOpenMP.h.


Member Function Documentation

static bool clang::OMPAtomicDirective::classof ( const Stmt T) [inline, static]

Reimplemented from clang::OMPExecutableDirective.

Definition at line 1504 of file StmtOpenMP.h.

References clang::Stmt::getStmtClass().

OMPAtomicDirective * OMPAtomicDirective::Create ( const ASTContext C,
SourceLocation  StartLoc,
SourceLocation  EndLoc,
ArrayRef< OMPClause * >  Clauses,
Stmt AssociatedStmt,
Expr X,
Expr V,
Expr E 
) [static]

Creates directive with a list of Clauses and 'x', 'v' and 'expr' parts of the atomic construct (see Section 2.12.6, atomic Construct, for detailed description of 'x', 'v' and 'expr').

Parameters:
CAST context.
StartLocStarting location of the directive kind.
EndLocEnding Location of the directive.
ClausesList of clauses.
AssociatedStmtStatement, associated with the directive.
X'x' part of the associated expression/statement.
V'v' part of the associated expression/statement.
Expr'expr' part of the associated expression/statement.

Definition at line 1928 of file Stmt.cpp.

References clang::ASTContext::Allocate(), clang::OMPExecutableDirective::setAssociatedStmt(), and clang::OMPExecutableDirective::setClauses().

Referenced by clang::Sema::ActOnOpenMPAtomicDirective().

OMPAtomicDirective * OMPAtomicDirective::CreateEmpty ( const ASTContext C,
unsigned  NumClauses,
EmptyShell   
) [static]

Creates an empty directive with the place for NumClauses clauses.

Parameters:
CAST context.
NumClausesNumber of clauses.

Definition at line 1945 of file Stmt.cpp.

References clang::ASTContext::Allocate().

Get 'expr' part of the associated expression/statement.

Definition at line 1499 of file StmtOpenMP.h.

References clang::Stmt::child_begin().

const Expr* clang::OMPAtomicDirective::getExpr ( ) const [inline]

Definition at line 1500 of file StmtOpenMP.h.

References clang::Stmt::child_begin().

Get 'v' part of the associated expression/statement.

Definition at line 1494 of file StmtOpenMP.h.

References clang::Stmt::child_begin().

const Expr* clang::OMPAtomicDirective::getV ( ) const [inline]

Definition at line 1495 of file StmtOpenMP.h.

References clang::Stmt::child_begin().

Get 'x' part of the associated expression/statement.

Definition at line 1489 of file StmtOpenMP.h.

References clang::Stmt::child_begin().

const Expr* clang::OMPAtomicDirective::getX ( ) const [inline]

Definition at line 1490 of file StmtOpenMP.h.

References clang::Stmt::child_begin().


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::OMPExecutableDirective.

Definition at line 1432 of file StmtOpenMP.h.


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