clang  14.0.0git
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::OMPUsesAllocatorsClause Class Referencefinal

This represents clause 'uses_allocators' in the '#pragma omp target'-based directives. More...

#include "clang/AST/OpenMPClause.h"

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

Classes

struct  Data
 Data for list of allocators. More...
 

Public Member Functions

SourceLocation getLParenLoc () const
 Returns the location of '('. More...
 
unsigned getNumberOfAllocators () const
 Returns number of allocators associated with the clause. More...
 
OMPUsesAllocatorsClause::Data getAllocatorData (unsigned I) const
 Returns data for the specified allocator. More...
 
child_range children ()
 
const_child_range children () const
 
child_range used_children ()
 
const_child_range used_children () const
 
- Public Member Functions inherited from clang::OMPClause
SourceLocation getBeginLoc () const
 Returns the starting location of the clause. More...
 
SourceLocation getEndLoc () const
 Returns the ending location of the clause. More...
 
void setLocStart (SourceLocation Loc)
 Sets the starting location of the clause. More...
 
void setLocEnd (SourceLocation Loc)
 Sets the ending location of the clause. More...
 
OpenMPClauseKind getClauseKind () const
 Returns kind of OpenMP clause (private, shared, reduction, etc.). More...
 
bool isImplicit () const
 
child_range children ()
 
const_child_range children () const
 
child_range used_children ()
 Get the iterator range for the expressions used in the clauses. More...
 
const_child_range used_children () const
 

Static Public Member Functions

static OMPUsesAllocatorsClauseCreate (const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< OMPUsesAllocatorsClause::Data > Data)
 Creates clause with a list of allocators Data. More...
 
static OMPUsesAllocatorsClauseCreateEmpty (const ASTContext &C, unsigned N)
 Creates an empty clause with the place for N allocators. More...
 
static bool classof (const OMPClause *T)
 
- Static Public Member Functions inherited from clang::OMPClause
static bool classof (const OMPClause *)
 

Friends

class OMPClauseReader
 

Additional Inherited Members

- Public Types inherited from clang::OMPClause
using child_iterator = StmtIterator
 
using const_child_iterator = ConstStmtIterator
 
using child_range = llvm::iterator_range< child_iterator >
 
using const_child_range = llvm::iterator_range< const_child_iterator >
 
- Protected Member Functions inherited from clang::OMPClause
 OMPClause (OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation EndLoc)
 

Detailed Description

This represents clause 'uses_allocators' in the '#pragma omp target'-based directives.

#pragma omp target uses_allocators(default_allocator, my_allocator(traits))

In this example directive '#pragma omp target' has clause 'uses_allocators' with the allocators 'default_allocator' and user-defined 'my_allocator'.

Definition at line 8119 of file OpenMPClause.h.

Member Function Documentation

◆ children() [1/2]

child_range clang::OMPUsesAllocatorsClause::children ( )
inline

Definition at line 8212 of file OpenMPClause.h.

References Begin.

◆ children() [2/2]

const_child_range clang::OMPUsesAllocatorsClause::children ( ) const
inline

Definition at line 8217 of file OpenMPClause.h.

References Begin.

◆ classof()

static bool clang::OMPUsesAllocatorsClause::classof ( const OMPClause T)
inlinestatic

Definition at line 8231 of file OpenMPClause.h.

References clang::OMPClause::getClauseKind().

◆ Create()

OMPUsesAllocatorsClause * OMPUsesAllocatorsClause::Create ( const ASTContext C,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc,
ArrayRef< OMPUsesAllocatorsClause::Data Data 
)
static

Creates clause with a list of allocators Data.

Parameters
CAST context.
StartLocStarting location of the clause.
LParenLocLocation of '('.
EndLocEnding location of the clause.
DataList of allocators.

Definition at line 1529 of file OpenMPClause.cpp.

◆ CreateEmpty()

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

Creates an empty clause with the place for N allocators.

Parameters
CAST context.
NThe number of allocators.

Definition at line 1542 of file OpenMPClause.cpp.

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

◆ getAllocatorData()

OMPUsesAllocatorsClause::Data OMPUsesAllocatorsClause::getAllocatorData ( unsigned  I) const

Returns data for the specified allocator.

Definition at line 1510 of file OpenMPClause.cpp.

References clang::OMPUsesAllocatorsClause::Data::Allocator.

◆ getLParenLoc()

SourceLocation clang::OMPUsesAllocatorsClause::getLParenLoc ( ) const
inline

Returns the location of '('.

Definition at line 8203 of file OpenMPClause.h.

◆ getNumberOfAllocators()

unsigned clang::OMPUsesAllocatorsClause::getNumberOfAllocators ( ) const
inline

Returns number of allocators associated with the clause.

Definition at line 8206 of file OpenMPClause.h.

◆ used_children() [1/2]

child_range clang::OMPUsesAllocatorsClause::used_children ( )
inline

Definition at line 8224 of file OpenMPClause.h.

◆ used_children() [2/2]

const_child_range clang::OMPUsesAllocatorsClause::used_children ( ) const
inline

Definition at line 8227 of file OpenMPClause.h.

Friends And Related Function Documentation

◆ OMPClauseReader

friend class OMPClauseReader
friend

Definition at line 8135 of file OpenMPClause.h.


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