clang 23.0.0git
OMPUseDevicePtrClause Class Referencefinal

This represents clause 'use_device_ptr' in the '#pragma omp ...' directives. More...

#include "clang/AST/OpenMPClause.h"

Inheritance diagram for OMPUseDevicePtrClause:
[legend]

Public Types

using private_copies_iterator = MutableArrayRef<Expr *>::iterator
using private_copies_const_iterator = ArrayRef<const Expr *>::iterator
using private_copies_range = llvm::iterator_range<private_copies_iterator>
using private_copies_const_range
using inits_iterator = MutableArrayRef<Expr *>::iterator
using inits_const_iterator = ArrayRef<const Expr *>::iterator
using inits_range = llvm::iterator_range<inits_iterator>
using inits_const_range = llvm::iterator_range<inits_const_iterator>
Public Types inherited from OMPMappableExprListClause< OMPUseDevicePtrClause >
using const_component_lists_range
using const_all_decls_iterator
 Iterators to access all the declarations, number of lists, list sizes, and components.
using const_all_decls_range
using const_all_num_lists_iterator
using const_all_num_lists_range
using const_all_lists_sizes_iterator
using const_all_lists_sizes_range
using const_all_components_iterator
using const_all_components_range
using mapperlist_iterator
using mapperlist_const_iterator
using mapperlist_range
using mapperlist_const_range
Public Types inherited from OMPClauseMappableExprCommon
using MappableExprComponentList = SmallVector<MappableComponent, 8>
using MappableExprComponentListRef = ArrayRef<MappableComponent>
using MappableExprComponentLists = SmallVector<MappableExprComponentList, 8>
using MappableExprComponentListsRef = ArrayRef<MappableExprComponentList>

Public Member Functions

OpenMPUseDevicePtrFallbackModifier getFallbackModifier () const
 Get the fallback modifier for the clause.
SourceLocation getFallbackModifierLoc () const
 Get the location of the fallback modifier.
private_copies_range private_copies ()
private_copies_const_range private_copies () const
inits_range inits ()
inits_const_range inits () const
child_range children ()
const_child_range children () const
child_range used_children ()
const_child_range used_children () const
Public Member Functions inherited from OMPMappableExprListClause< OMPUseDevicePtrClause >
unsigned getUniqueDeclarationsNum () const
 Return the number of unique base declarations in this clause.
unsigned getTotalComponentListNum () const
 Return the number of lists derived from the clause expressions.
unsigned getTotalComponentsNum () const
 Return the total number of components in all lists derived from the clause.
NestedNameSpecifierLoc getMapperQualifierLoc () const
 Gets the nested name specifier for associated user-defined mapper.
const DeclarationNameInfo & getMapperIdInfo () const
 Gets the name info for associated user-defined mapper.
const_component_lists_iterator component_lists_begin () const
 Iterators for all component lists.
const_component_lists_iterator component_lists_end () const
const_component_lists_range component_lists () const
const_component_lists_iterator decl_component_lists_begin (const ValueDecl *VD) const
 Iterators for component lists associated with the provided declaration.
const_component_lists_iterator decl_component_lists_end () const
const_component_lists_range decl_component_lists (const ValueDecl *VD) const
const_all_decls_range all_decls () const
const_all_num_lists_range all_num_lists () const
const_all_lists_sizes_range all_lists_sizes () const
const_all_components_range all_components () const
mapperlist_iterator mapperlist_begin ()
mapperlist_iterator mapperlist_end ()
mapperlist_range mapperlists ()

Static Public Member Functions

static OMPUseDevicePtrClauseCreate (const ASTContext &C, const OMPVarListLocTy &Locs, ArrayRef< Expr * > Vars, ArrayRef< Expr * > PrivateVars, ArrayRef< Expr * > Inits, ArrayRef< ValueDecl * > Declarations, MappableExprComponentListsRef ComponentLists, OpenMPUseDevicePtrFallbackModifier FallbackModifier, SourceLocation FallbackModifierLoc)
 Creates clause with a list of variables Vars.
static OMPUseDevicePtrClauseCreateEmpty (const ASTContext &C, const OMPMappableExprListSizeTy &Sizes)
 Creates an empty clause with the place for NumVars variables.
static bool classof (const OMPClause *T)
Static Public Member Functions inherited from OMPClauseMappableExprCommon
static QualType getComponentExprElementType (const Expr *Exp)
 Get the type of an element of a ComponentList Expr Exp.
static std::pair< const Expr *, std::optional< size_t > > findAttachPtrExpr (MappableExprComponentListRef Components, OpenMPDirectiveKind CurDirKind)
 Find the attach pointer expression from a list of mappable expression components.

Friends

class OMPClauseReader

Additional Inherited Members

Protected Member Functions inherited from OMPMappableExprListClause< OMPUseDevicePtrClause >
 OMPMappableExprListClause (OpenMPClauseKind K, const OMPVarListLocTy &Locs, const OMPMappableExprListSizeTy &Sizes, bool SupportsMapper=false, NestedNameSpecifierLoc *MapperQualifierLocPtr=nullptr, DeclarationNameInfo *MapperIdInfoPtr=nullptr)
 Build a clause for NumUniqueDeclarations declarations, NumComponentLists total component lists, and NumComponents total components.
MutableArrayRef< ValueDecl * > getUniqueDeclsRef ()
 Get the unique declarations that are in the trailing objects of the class.
void setUniqueDecls (ArrayRef< ValueDecl * > UDs)
 Set the unique declarations that are in the trailing objects of the class.
MutableArrayRef< unsignedgetDeclNumListsRef ()
 Get the number of lists per declaration that are in the trailing objects of the class.
void setDeclNumLists (ArrayRef< unsigned > DNLs)
 Set the number of lists per declaration that are in the trailing objects of the class.
MutableArrayRef< unsignedgetComponentListSizesRef ()
 Get the cumulative component lists sizes that are in the trailing objects of the class. They are appended after the number of lists.
void setComponentListSizes (ArrayRef< unsigned > CLSs)
 Set the cumulative component lists sizes that are in the trailing objects of the class.
MutableArrayRef< MappableComponentgetComponentsRef ()
 Get the components that are in the trailing objects of the class.
void setComponents (ArrayRef< MappableComponent > Components, ArrayRef< unsigned > CLSs)
 Set the components that are in the trailing objects of the class. This requires the list sizes so that it can also fill the original expressions, which are the first component of each list.
void setClauseInfo (ArrayRef< ValueDecl * > Declarations, MappableExprComponentListsRef ComponentLists)
 Fill the clause information from the list of declarations and associated component lists.
void setMapperQualifierLoc (NestedNameSpecifierLoc NNSL)
 Set the nested name specifier of associated user-defined mapper.
void setMapperIdInfo (DeclarationNameInfo MapperId)
 Set the name of associated user-defined mapper.
MutableArrayRef< Expr * > getUDMapperRefs ()
 Get the user-defined mapper references that are in the trailing objects of the class.
void setUDMapperRefs (ArrayRef< Expr * > DMDs)
 Set the user-defined mappers that are in the trailing objects of the class.
Static Protected Member Functions inherited from OMPClauseMappableExprCommon
static unsigned getComponentsTotalNumber (MappableExprComponentListsRef ComponentLists)
static unsigned getUniqueDeclarationsTotalNumber (ArrayRef< const ValueDecl * > Declarations)

Detailed Description

This represents clause 'use_device_ptr' in the '#pragma omp ...' directives.

#pragma omp target data use_device_ptr(a,b)

In this example directive '#pragma omp target data' has clause 'use_device_ptr' with the variables 'a' and 'b'.

Definition at line 8054 of file OpenMPClause.h.

Member Typedef Documentation

◆ inits_const_iterator

using OMPUseDevicePtrClause::inits_const_iterator = ArrayRef<const Expr *>::iterator

Definition at line 8204 of file OpenMPClause.h.

◆ inits_const_range

Definition at line 8206 of file OpenMPClause.h.

◆ inits_iterator

using OMPUseDevicePtrClause::inits_iterator = MutableArrayRef<Expr *>::iterator

Definition at line 8203 of file OpenMPClause.h.

◆ inits_range

using OMPUseDevicePtrClause::inits_range = llvm::iterator_range<inits_iterator>

Definition at line 8205 of file OpenMPClause.h.

◆ private_copies_const_iterator

Definition at line 8192 of file OpenMPClause.h.

◆ private_copies_const_range

Initial value:
llvm::iterator_range<private_copies_const_iterator>

Definition at line 8194 of file OpenMPClause.h.

◆ private_copies_iterator

using OMPUseDevicePtrClause::private_copies_iterator = MutableArrayRef<Expr *>::iterator

Definition at line 8191 of file OpenMPClause.h.

◆ private_copies_range

Definition at line 8193 of file OpenMPClause.h.

Member Function Documentation

◆ children() [1/2]

child_range OMPUseDevicePtrClause::children ( )
inline

Definition at line 8212 of file OpenMPClause.h.

Referenced by children().

◆ children() [2/2]

const_child_range OMPUseDevicePtrClause::children ( ) const
inline

Definition at line 8217 of file OpenMPClause.h.

References children().

◆ classof()

bool OMPUseDevicePtrClause::classof ( const OMPClause * T)
inlinestatic

Definition at line 8228 of file OpenMPClause.h.

◆ Create()

OMPUseDevicePtrClause * OMPUseDevicePtrClause::Create ( const ASTContext & C,
const OMPVarListLocTy & Locs,
ArrayRef< Expr * > Vars,
ArrayRef< Expr * > PrivateVars,
ArrayRef< Expr * > Inits,
ArrayRef< ValueDecl * > Declarations,
MappableExprComponentListsRef ComponentLists,
OpenMPUseDevicePtrFallbackModifier FallbackModifier,
SourceLocation FallbackModifierLoc )
static

Creates clause with a list of variables Vars.

Parameters
CAST context.
LocsLocations needed to build a mappable clause. It includes 1) StartLoc: starting location of the clause (the clause keyword); 2) LParenLoc: location of '('; 3) EndLoc: ending location of the clause.
VarsThe original expression used in the clause.
PrivateVarsExpressions referring to private copies.
InitsExpressions referring to private copy initializers.
DeclarationsDeclarations used in the clause.
ComponentListsComponent lists used in the clause.
FallbackModifierThe fallback modifier for the clause.
FallbackModifierLocLocation of the fallback modifier.

Definition at line 1441 of file OpenMPClause.cpp.

References clang::C, OMPClauseMappableExprCommon::getComponentsTotalNumber(), OMPClauseMappableExprCommon::getUniqueDeclarationsTotalNumber(), clang::Inits, OMPMappableExprListSizeTy::NumComponentLists, OMPMappableExprListSizeTy::NumComponents, OMPMappableExprListSizeTy::NumUniqueDeclarations, and OMPMappableExprListSizeTy::NumVars.

Referenced by clang::SemaOpenMP::ActOnOpenMPUseDevicePtrClause().

◆ CreateEmpty()

OMPUseDevicePtrClause * OMPUseDevicePtrClause::CreateEmpty ( const ASTContext & C,
const OMPMappableExprListSizeTy & Sizes )
static

Creates an empty clause with the place for NumVars variables.

Parameters
CAST context.
SizesAll required sizes to build a mappable clause. It includes 1) NumVars: number of expressions listed in this clause; 2) NumUniqueDeclarations: number of unique base declarations in this clause; 3) NumComponentLists: number of component lists in this clause; and 4) NumComponents: total number of expression components in the clause.

Definition at line 1482 of file OpenMPClause.cpp.

References clang::C, OMPMappableExprListSizeTy::NumComponentLists, OMPMappableExprListSizeTy::NumComponents, OMPMappableExprListSizeTy::NumUniqueDeclarations, and OMPMappableExprListSizeTy::NumVars.

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

◆ getFallbackModifier()

OpenMPUseDevicePtrFallbackModifier OMPUseDevicePtrClause::getFallbackModifier ( ) const
inline

Get the fallback modifier for the clause.

Definition at line 8184 of file OpenMPClause.h.

◆ getFallbackModifierLoc()

SourceLocation OMPUseDevicePtrClause::getFallbackModifierLoc ( ) const
inline

Get the location of the fallback modifier.

Definition at line 8189 of file OpenMPClause.h.

◆ inits() [1/2]

inits_range OMPUseDevicePtrClause::inits ( )
inline

Definition at line 8208 of file OpenMPClause.h.

◆ inits() [2/2]

inits_const_range OMPUseDevicePtrClause::inits ( ) const
inline

Definition at line 8210 of file OpenMPClause.h.

◆ private_copies() [1/2]

private_copies_range OMPUseDevicePtrClause::private_copies ( )
inline

Definition at line 8197 of file OpenMPClause.h.

◆ private_copies() [2/2]

private_copies_const_range OMPUseDevicePtrClause::private_copies ( ) const
inline

Definition at line 8199 of file OpenMPClause.h.

◆ used_children() [1/2]

child_range OMPUseDevicePtrClause::used_children ( )
inline

Definition at line 8221 of file OpenMPClause.h.

◆ used_children() [2/2]

const_child_range OMPUseDevicePtrClause::used_children ( ) const
inline

Definition at line 8224 of file OpenMPClause.h.

◆ OMPClauseReader

friend class OMPClauseReader
friend

Definition at line 8059 of file OpenMPClause.h.

References OMPClauseReader.

Referenced by OMPClauseReader.


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