clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Friends
clang::AtomicExpr Class Reference

#include <Expr.h>

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

List of all members.

Public Types

enum  AtomicOp
enum  AtomicOrderingKind {
  AO_ABI_memory_order_relaxed = 0, AO_ABI_memory_order_consume = 1, AO_ABI_memory_order_acquire = 2, AO_ABI_memory_order_release = 3,
  AO_ABI_memory_order_acq_rel = 4, AO_ABI_memory_order_seq_cst = 5
}

Public Member Functions

 AtomicExpr (SourceLocation BLoc, ArrayRef< Expr * > args, QualType t, AtomicOp op, SourceLocation RP)
 AtomicExpr (EmptyShell Empty)
 Build an empty AtomicExpr.
ExprgetPtr () const
ExprgetOrder () const
ExprgetVal1 () const
ExprgetOrderFail () const
ExprgetVal2 () const
ExprgetWeak () const
AtomicOp getOp () const
unsigned getNumSubExprs ()
Expr ** getSubExprs ()
bool isVolatile () const
bool isCmpXChg () const
SourceLocation getBuiltinLoc () const
SourceLocation getRParenLoc () const
SourceLocation getLocStart () const LLVM_READONLY
SourceLocation getLocEnd () const LLVM_READONLY
child_range children ()

Static Public Member Functions

static unsigned getNumSubExprs (AtomicOp Op)
 Determine the number of arguments the specified atomic builtin should have.
static bool classof (const Stmt *T)

Friends

class ASTStmtReader

Detailed Description

AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load, __atomic_store, and __atomic_compare_exchange_*, for the similarly-named C++11 instructions, and __c11 variants for <stdatomic.h>. All of these instructions take one primary pointer and at least one memory order.

Definition at line 4751 of file Expr.h.


Member Enumeration Documentation

Definition at line 4753 of file Expr.h.

Enumerator:
AO_ABI_memory_order_relaxed 
AO_ABI_memory_order_consume 
AO_ABI_memory_order_acquire 
AO_ABI_memory_order_release 
AO_ABI_memory_order_acq_rel 
AO_ABI_memory_order_seq_cst 

Definition at line 4762 of file Expr.h.


Constructor & Destructor Documentation

AtomicExpr::AtomicExpr ( SourceLocation  BLoc,
ArrayRef< Expr * >  args,
QualType  t,
AtomicOp  op,
SourceLocation  RP 
)
clang::AtomicExpr::AtomicExpr ( EmptyShell  Empty) [inline, explicit]

Build an empty AtomicExpr.

Definition at line 4789 of file Expr.h.


Member Function Documentation

Reimplemented from clang::Stmt.

Definition at line 4845 of file Expr.h.

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

Reimplemented from clang::Expr.

Definition at line 4840 of file Expr.h.

References clang::Stmt::getStmtClass().

Definition at line 4834 of file Expr.h.

Reimplemented from clang::Stmt.

Definition at line 4838 of file Expr.h.

Reimplemented from clang::Stmt.

Definition at line 4837 of file Expr.h.

Determine the number of arguments the specified atomic builtin should have.

Definition at line 4219 of file Expr.cpp.

Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr().

Definition at line 4819 of file Expr.h.

Referenced by AtomicExpr().

AtomicOp clang::AtomicExpr::getOp ( ) const [inline]
Expr* clang::AtomicExpr::getOrder ( ) const [inline]

Definition at line 4794 of file Expr.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr().

Definition at line 4803 of file Expr.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr().

Expr* clang::AtomicExpr::getPtr ( ) const [inline]

Definition at line 4835 of file Expr.h.

Definition at line 4821 of file Expr.h.

Expr* clang::AtomicExpr::getVal1 ( ) const [inline]

Definition at line 4797 of file Expr.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr().

Expr* clang::AtomicExpr::getVal2 ( ) const [inline]

Definition at line 4807 of file Expr.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr().

Expr* clang::AtomicExpr::getWeak ( ) const [inline]

Definition at line 4813 of file Expr.h.

Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr().

bool clang::AtomicExpr::isCmpXChg ( ) const [inline]

Definition at line 4827 of file Expr.h.

References getOp().

Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr().

bool clang::AtomicExpr::isVolatile ( ) const [inline]

Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::Stmt.

Definition at line 4778 of file Expr.h.


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