clang 23.0.0git
OMPMappableExprListClause< T > Class Template Reference

This represents clauses with a list of expressions that are mappable. Examples of these clauses are 'map' in '#pragma omp target [enter|exit] [data]...' directives, and 'to' and 'from in '#pragma omp target update...' directives. More...

#include "clang/AST/OpenMPClause.h"

Inheritance diagram for OMPMappableExprListClause< T >:
[legend]

Classes

class  const_component_lists_iterator
 Iterator that browse the components by lists. It also allows browsing components of a single declaration. More...

Public Types

using const_component_lists_range
using const_all_decls_iterator = ArrayRef<ValueDecl *>::iterator
 Iterators to access all the declarations, number of lists, list sizes, and components.
using const_all_decls_range = llvm::iterator_range<const_all_decls_iterator>
using const_all_num_lists_iterator = ArrayRef<unsigned>::iterator
using const_all_num_lists_range
using const_all_lists_sizes_iterator = ArrayRef<unsigned>::iterator
using const_all_lists_sizes_range
using const_all_components_iterator = ArrayRef<MappableComponent>::iterator
using const_all_components_range
using mapperlist_iterator = MutableArrayRef<Expr *>::iterator
using mapperlist_const_iterator = ArrayRef<const Expr *>::iterator
using mapperlist_range = llvm::iterator_range<mapperlist_iterator>
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

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_const_iterator mapperlist_begin () const
mapperlist_const_iterator mapperlist_end () const
mapperlist_range mapperlists ()
mapperlist_const_range mapperlists () const

Protected Member Functions

 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.
ArrayRef< ValueDecl * > getUniqueDeclsRef () const
 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.
ArrayRef< unsignedgetDeclNumListsRef () const
 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.
ArrayRef< unsignedgetComponentListSizesRef () const
 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.
ArrayRef< MappableComponentgetComponentsRef () const
 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.
ArrayRef< Expr * > getUDMapperRefs () const
 Get the user-defined mappers 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.

Friends

class OMPClauseReader

Additional Inherited Members

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.
Static Protected Member Functions inherited from OMPClauseMappableExprCommon
static unsigned getComponentsTotalNumber (MappableExprComponentListsRef ComponentLists)
static unsigned getUniqueDeclarationsTotalNumber (ArrayRef< const ValueDecl * > Declarations)

Detailed Description

template<class T>
class OMPMappableExprListClause< T >

This represents clauses with a list of expressions that are mappable. Examples of these clauses are 'map' in '#pragma omp target [enter|exit] [data]...' directives, and 'to' and 'from in '#pragma omp target update...' directives.

Definition at line 6058 of file OpenMPClause.h.

Member Typedef Documentation

◆ const_all_components_iterator

template<class T>
using OMPMappableExprListClause< T >::const_all_components_iterator = ArrayRef<MappableComponent>::iterator

Definition at line 6570 of file OpenMPClause.h.

◆ const_all_components_range

template<class T>
using OMPMappableExprListClause< T >::const_all_components_range
Initial value:
llvm::iterator_range<const_all_components_iterator>

Definition at line 6571 of file OpenMPClause.h.

◆ const_all_decls_iterator

template<class T>
using OMPMappableExprListClause< T >::const_all_decls_iterator = ArrayRef<ValueDecl *>::iterator

Iterators to access all the declarations, number of lists, list sizes, and components.

Definition at line 6549 of file OpenMPClause.h.

◆ const_all_decls_range

template<class T>
using OMPMappableExprListClause< T >::const_all_decls_range = llvm::iterator_range<const_all_decls_iterator>

Definition at line 6550 of file OpenMPClause.h.

◆ const_all_lists_sizes_iterator

template<class T>
using OMPMappableExprListClause< T >::const_all_lists_sizes_iterator = ArrayRef<unsigned>::iterator

Definition at line 6562 of file OpenMPClause.h.

◆ const_all_lists_sizes_range

template<class T>
using OMPMappableExprListClause< T >::const_all_lists_sizes_range
Initial value:
llvm::iterator_range<const_all_lists_sizes_iterator>

Definition at line 6563 of file OpenMPClause.h.

◆ const_all_num_lists_iterator

template<class T>
using OMPMappableExprListClause< T >::const_all_num_lists_iterator = ArrayRef<unsigned>::iterator

Definition at line 6554 of file OpenMPClause.h.

◆ const_all_num_lists_range

template<class T>
using OMPMappableExprListClause< T >::const_all_num_lists_range
Initial value:
llvm::iterator_range<const_all_num_lists_iterator>

Definition at line 6555 of file OpenMPClause.h.

◆ const_component_lists_range

template<class T>
using OMPMappableExprListClause< T >::const_component_lists_range
Initial value:
llvm::iterator_range<const_component_lists_iterator>

Definition at line 6510 of file OpenMPClause.h.

◆ mapperlist_const_iterator

template<class T>
using OMPMappableExprListClause< T >::mapperlist_const_iterator = ArrayRef<const Expr *>::iterator

Definition at line 6579 of file OpenMPClause.h.

◆ mapperlist_const_range

template<class T>
using OMPMappableExprListClause< T >::mapperlist_const_range
Initial value:
llvm::iterator_range<mapperlist_const_iterator>

Definition at line 6581 of file OpenMPClause.h.

◆ mapperlist_iterator

template<class T>
using OMPMappableExprListClause< T >::mapperlist_iterator = MutableArrayRef<Expr *>::iterator

Definition at line 6578 of file OpenMPClause.h.

◆ mapperlist_range

template<class T>
using OMPMappableExprListClause< T >::mapperlist_range = llvm::iterator_range<mapperlist_iterator>

Definition at line 6580 of file OpenMPClause.h.

Constructor & Destructor Documentation

◆ OMPMappableExprListClause()

template<class T>
OMPMappableExprListClause< T >::OMPMappableExprListClause ( OpenMPClauseKind K,
const OMPVarListLocTy & Locs,
const OMPMappableExprListSizeTy & Sizes,
bool SupportsMapper = false,
NestedNameSpecifierLoc * MapperQualifierLocPtr = nullptr,
DeclarationNameInfo * MapperIdInfoPtr = nullptr )
inlineprotected

Build a clause for NumUniqueDeclarations declarations, NumComponentLists total component lists, and NumComponents total components.

Parameters
KKind of the clause.
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.
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.
SupportsMapperIndicates whether this clause is possible to have user-defined mappers associated.
MapperQualifierLocPtrC++ nested name specifier for the associated user-defined mapper.
MapperIdInfoPtrThe identifier of associated user-defined mapper.

Definition at line 6101 of file OpenMPClause.h.

Member Function Documentation

◆ all_components()

template<class T>
const_all_components_range OMPMappableExprListClause< T >::all_components ( ) const
inline

Definition at line 6574 of file OpenMPClause.h.

References getComponentsRef().

◆ all_decls()

template<class T>
const_all_decls_range OMPMappableExprListClause< T >::all_decls ( ) const
inline

Definition at line 6552 of file OpenMPClause.h.

References getUniqueDeclsRef().

◆ all_lists_sizes()

template<class T>
const_all_lists_sizes_range OMPMappableExprListClause< T >::all_lists_sizes ( ) const
inline

Definition at line 6566 of file OpenMPClause.h.

References getComponentListSizesRef().

◆ all_num_lists()

template<class T>
const_all_num_lists_range OMPMappableExprListClause< T >::all_num_lists ( ) const
inline

Definition at line 6558 of file OpenMPClause.h.

References getDeclNumListsRef().

◆ component_lists()

template<class T>
const_component_lists_range OMPMappableExprListClause< T >::component_lists ( ) const
inline

Definition at line 6527 of file OpenMPClause.h.

References component_lists_begin(), and component_lists_end().

◆ component_lists_begin()

template<class T>
const_component_lists_iterator OMPMappableExprListClause< T >::component_lists_begin ( ) const
inline

Iterators for all component lists.

Definition at line 6514 of file OpenMPClause.h.

References getComponentListSizesRef(), getComponentsRef(), getDeclNumListsRef(), getUDMapperRefs(), and getUniqueDeclsRef().

Referenced by component_lists().

◆ component_lists_end()

template<class T>
const_component_lists_iterator OMPMappableExprListClause< T >::component_lists_end ( ) const
inline

Definition at line 6520 of file OpenMPClause.h.

References getComponentsRef().

Referenced by component_lists(), and decl_component_lists_end().

◆ decl_component_lists()

template<class T>
const_component_lists_range OMPMappableExprListClause< T >::decl_component_lists ( const ValueDecl * VD) const
inline

Definition at line 6543 of file OpenMPClause.h.

References decl_component_lists_begin(), and decl_component_lists_end().

◆ decl_component_lists_begin()

template<class T>
const_component_lists_iterator OMPMappableExprListClause< T >::decl_component_lists_begin ( const ValueDecl * VD) const
inline

Iterators for component lists associated with the provided declaration.

Definition at line 6534 of file OpenMPClause.h.

References getComponentListSizesRef(), getComponentsRef(), getDeclNumListsRef(), getUDMapperRefs(), and getUniqueDeclsRef().

Referenced by decl_component_lists().

◆ decl_component_lists_end()

template<class T>
const_component_lists_iterator OMPMappableExprListClause< T >::decl_component_lists_end ( ) const
inline

Definition at line 6540 of file OpenMPClause.h.

References component_lists_end().

Referenced by decl_component_lists().

◆ getComponentListSizesRef() [1/2]

template<class T>
MutableArrayRef< unsigned > OMPMappableExprListClause< T >::getComponentListSizesRef ( )
inlineprotected

Get the cumulative component lists sizes that are in the trailing objects of the class. They are appended after the number of lists.

Definition at line 6165 of file OpenMPClause.h.

Referenced by all_lists_sizes(), component_lists_begin(), decl_component_lists_begin(), setClauseInfo(), and setComponentListSizes().

◆ getComponentListSizesRef() [2/2]

template<class T>
ArrayRef< unsigned > OMPMappableExprListClause< T >::getComponentListSizesRef ( ) const
inlineprotected

Get the cumulative component lists sizes that are in the trailing objects of the class. They are appended after the number of lists.

Definition at line 6175 of file OpenMPClause.h.

◆ getComponentsRef() [1/2]

template<class T>
MutableArrayRef< MappableComponent > OMPMappableExprListClause< T >::getComponentsRef ( )
inlineprotected

Get the components that are in the trailing objects of the class.

Definition at line 6192 of file OpenMPClause.h.

Referenced by all_components(), component_lists_begin(), component_lists_end(), decl_component_lists_begin(), setClauseInfo(), and setComponents().

◆ getComponentsRef() [2/2]

template<class T>
ArrayRef< MappableComponent > OMPMappableExprListClause< T >::getComponentsRef ( ) const
inlineprotected

Get the components that are in the trailing objects of the class.

Definition at line 6199 of file OpenMPClause.h.

◆ getDeclNumListsRef() [1/2]

template<class T>
MutableArrayRef< unsigned > OMPMappableExprListClause< T >::getDeclNumListsRef ( )
inlineprotected

Get the number of lists per declaration that are in the trailing objects of the class.

Definition at line 6143 of file OpenMPClause.h.

Referenced by all_num_lists(), component_lists_begin(), decl_component_lists_begin(), setClauseInfo(), and setDeclNumLists().

◆ getDeclNumListsRef() [2/2]

template<class T>
ArrayRef< unsigned > OMPMappableExprListClause< T >::getDeclNumListsRef ( ) const
inlineprotected

Get the number of lists per declaration that are in the trailing objects of the class.

Definition at line 6150 of file OpenMPClause.h.

◆ getMapperIdInfo()

template<class T>
const DeclarationNameInfo & OMPMappableExprListClause< T >::getMapperIdInfo ( ) const
inline

Gets the name info for associated user-defined mapper.

Definition at line 6352 of file OpenMPClause.h.

◆ getMapperQualifierLoc()

template<class T>
NestedNameSpecifierLoc OMPMappableExprListClause< T >::getMapperQualifierLoc ( ) const
inline

Gets the nested name specifier for associated user-defined mapper.

Definition at line 6347 of file OpenMPClause.h.

◆ getTotalComponentListNum()

template<class T>
unsigned OMPMappableExprListClause< T >::getTotalComponentListNum ( ) const
inline

Return the number of lists derived from the clause expressions.

Definition at line 6340 of file OpenMPClause.h.

◆ getTotalComponentsNum()

template<class T>
unsigned OMPMappableExprListClause< T >::getTotalComponentsNum ( ) const
inline

Return the total number of components in all lists derived from the clause.

Definition at line 6344 of file OpenMPClause.h.

◆ getUDMapperRefs() [1/2]

template<class T>
MutableArrayRef< Expr * > OMPMappableExprListClause< T >::getUDMapperRefs ( )
inlineprotected

Get the user-defined mapper references that are in the trailing objects of the class.

Definition at line 6305 of file OpenMPClause.h.

Referenced by component_lists_begin(), decl_component_lists_begin(), mapperlist_begin(), mapperlist_begin(), mapperlist_end(), mapperlist_end(), and setUDMapperRefs().

◆ getUDMapperRefs() [2/2]

template<class T>
ArrayRef< Expr * > OMPMappableExprListClause< T >::getUDMapperRefs ( ) const
inlineprotected

Get the user-defined mappers references that are in the trailing objects of the class.

Definition at line 6316 of file OpenMPClause.h.

◆ getUniqueDeclarationsNum()

template<class T>
unsigned OMPMappableExprListClause< T >::getUniqueDeclarationsNum ( ) const
inline

Return the number of unique base declarations in this clause.

Definition at line 6337 of file OpenMPClause.h.

◆ getUniqueDeclsRef() [1/2]

template<class T>
MutableArrayRef< ValueDecl * > OMPMappableExprListClause< T >::getUniqueDeclsRef ( )
inlineprotected

Get the unique declarations that are in the trailing objects of the class.

Definition at line 6119 of file OpenMPClause.h.

Referenced by all_decls(), component_lists_begin(), decl_component_lists_begin(), setClauseInfo(), and setUniqueDecls().

◆ getUniqueDeclsRef() [2/2]

template<class T>
ArrayRef< ValueDecl * > OMPMappableExprListClause< T >::getUniqueDeclsRef ( ) const
inlineprotected

Get the unique declarations that are in the trailing objects of the class.

Definition at line 6127 of file OpenMPClause.h.

◆ mapperlist_begin() [1/2]

template<class T>
mapperlist_iterator OMPMappableExprListClause< T >::mapperlist_begin ( )
inline

Definition at line 6584 of file OpenMPClause.h.

References getUDMapperRefs().

Referenced by mapperlists(), and mapperlists().

◆ mapperlist_begin() [2/2]

template<class T>
mapperlist_const_iterator OMPMappableExprListClause< T >::mapperlist_begin ( ) const
inline

Definition at line 6586 of file OpenMPClause.h.

References getUDMapperRefs().

◆ mapperlist_end() [1/2]

template<class T>
mapperlist_iterator OMPMappableExprListClause< T >::mapperlist_end ( )
inline

Definition at line 6585 of file OpenMPClause.h.

References getUDMapperRefs().

Referenced by mapperlists(), and mapperlists().

◆ mapperlist_end() [2/2]

template<class T>
mapperlist_const_iterator OMPMappableExprListClause< T >::mapperlist_end ( ) const
inline

Definition at line 6589 of file OpenMPClause.h.

References getUDMapperRefs().

◆ mapperlists() [1/2]

template<class T>
mapperlist_range OMPMappableExprListClause< T >::mapperlists ( )
inline

Definition at line 6592 of file OpenMPClause.h.

References mapperlist_begin(), and mapperlist_end().

◆ mapperlists() [2/2]

template<class T>
mapperlist_const_range OMPMappableExprListClause< T >::mapperlists ( ) const
inline

Definition at line 6595 of file OpenMPClause.h.

References mapperlist_begin(), and mapperlist_end().

◆ setClauseInfo()

template<class T>
void OMPMappableExprListClause< T >::setClauseInfo ( ArrayRef< ValueDecl * > Declarations,
MappableExprComponentListsRef ComponentLists )
inlineprotected

Fill the clause information from the list of declarations and associated component lists.

Definition at line 6219 of file OpenMPClause.h.

References getComponentListSizesRef(), getComponentsRef(), OMPClauseMappableExprCommon::getComponentsTotalNumber(), getDeclNumListsRef(), OMPClauseMappableExprCommon::getUniqueDeclarationsTotalNumber(), and getUniqueDeclsRef().

◆ setComponentListSizes()

template<class T>
void OMPMappableExprListClause< T >::setComponentListSizes ( ArrayRef< unsigned > CLSs)
inlineprotected

Set the cumulative component lists sizes that are in the trailing objects of the class.

Definition at line 6185 of file OpenMPClause.h.

References getComponentListSizesRef().

◆ setComponents()

template<class T>
void OMPMappableExprListClause< T >::setComponents ( ArrayRef< MappableComponent > Components,
ArrayRef< unsigned > CLSs )
inlineprotected

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.

Definition at line 6208 of file OpenMPClause.h.

References getComponentsRef().

◆ setDeclNumLists()

template<class T>
void OMPMappableExprListClause< T >::setDeclNumLists ( ArrayRef< unsigned > DNLs)
inlineprotected

Set the number of lists per declaration that are in the trailing objects of the class.

Definition at line 6157 of file OpenMPClause.h.

References getDeclNumListsRef().

◆ setMapperIdInfo()

template<class T>
void OMPMappableExprListClause< T >::setMapperIdInfo ( DeclarationNameInfo MapperId)
inlineprotected

Set the name of associated user-defined mapper.

Definition at line 6299 of file OpenMPClause.h.

◆ setMapperQualifierLoc()

template<class T>
void OMPMappableExprListClause< T >::setMapperQualifierLoc ( NestedNameSpecifierLoc NNSL)
inlineprotected

Set the nested name specifier of associated user-defined mapper.

Definition at line 6294 of file OpenMPClause.h.

◆ setUDMapperRefs()

template<class T>
void OMPMappableExprListClause< T >::setUDMapperRefs ( ArrayRef< Expr * > DMDs)
inlineprotected

Set the user-defined mappers that are in the trailing objects of the class.

Definition at line 6327 of file OpenMPClause.h.

References getUDMapperRefs().

◆ setUniqueDecls()

template<class T>
void OMPMappableExprListClause< T >::setUniqueDecls ( ArrayRef< ValueDecl * > UDs)
inlineprotected

Set the unique declarations that are in the trailing objects of the class.

Definition at line 6135 of file OpenMPClause.h.

References getUniqueDeclsRef().

◆ OMPClauseReader

template<class T>
friend class OMPClauseReader
friend

Definition at line 6060 of file OpenMPClause.h.

References OMPClauseReader.

Referenced by OMPClauseReader.


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