clang  13.0.0git
Classes | Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
clang::OMPMappableExprListClause< T > Class Template Reference

This represents clauses with a list of expressions that are mappable. More...

#include "clang/AST/OpenMPClause.h"

Inheritance diagram for clang::OMPMappableExprListClause< T >:
Inheritance graph
[legend]
Collaboration diagram for clang::OMPMappableExprListClause< T >:
Collaboration graph
[legend]

Classes

class  const_component_lists_iterator
 Iterator that browse the components by lists. More...
 

Public Types

using const_component_lists_range = llvm::iterator_range< const_component_lists_iterator >
 
using const_all_decls_iterator = ArrayRef< ValueDecl * >::iterator
 Iterators to access all the declarations, number of lists, list sizes, and components. More...
 
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 = llvm::iterator_range< const_all_num_lists_iterator >
 
using const_all_lists_sizes_iterator = ArrayRef< unsigned >::iterator
 
using const_all_lists_sizes_range = llvm::iterator_range< const_all_lists_sizes_iterator >
 
using const_all_components_iterator = ArrayRef< MappableComponent >::iterator
 
using const_all_components_range = llvm::iterator_range< const_all_components_iterator >
 
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 = llvm::iterator_range< mapperlist_const_iterator >
 
- Public Types inherited from clang::OMPVarListClause< T >
using varlist_iterator = MutableArrayRef< Expr * >::iterator
 
using varlist_const_iterator = ArrayRef< const Expr * >::iterator
 
using varlist_range = llvm::iterator_range< varlist_iterator >
 
using varlist_const_range = llvm::iterator_range< varlist_const_iterator >
 
- 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 >
 
- Public Types inherited from clang::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. More...
 
unsigned getTotalComponentListNum () const
 Return the number of lists derived from the clause expressions. More...
 
unsigned getTotalComponentsNum () const
 Return the total number of components in all lists derived from the clause. More...
 
NestedNameSpecifierLoc getMapperQualifierLoc () const
 Gets the nested name specifier for associated user-defined mapper. More...
 
const DeclarationNameInfogetMapperIdInfo () const
 Gets the name info for associated user-defined mapper. More...
 
const_component_lists_iterator component_lists_begin () const
 Iterators for all component lists. More...
 
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. More...
 
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
 
- Public Member Functions inherited from clang::OMPVarListClause< T >
unsigned varlist_size () const
 
bool varlist_empty () const
 
varlist_range varlists ()
 
varlist_const_range varlists () const
 
varlist_iterator varlist_begin ()
 
varlist_iterator varlist_end ()
 
varlist_const_iterator varlist_begin () const
 
varlist_const_iterator varlist_end () const
 
void setLParenLoc (SourceLocation Loc)
 Sets the location of '('. More...
 
SourceLocation getLParenLoc () const
 Returns the location of '('. More...
 
ArrayRef< const Expr * > getVarRefs () const
 Fetches list of all variables in the clause. More...
 
- 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
 

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. More...
 
MutableArrayRef< ValueDecl * > getUniqueDeclsRef ()
 Get the unique declarations that are in the trailing objects of the class. More...
 
ArrayRef< ValueDecl * > getUniqueDeclsRef () const
 Get the unique declarations that are in the trailing objects of the class. More...
 
void setUniqueDecls (ArrayRef< ValueDecl * > UDs)
 Set the unique declarations that are in the trailing objects of the class. More...
 
MutableArrayRef< unsignedgetDeclNumListsRef ()
 Get the number of lists per declaration that are in the trailing objects of the class. More...
 
ArrayRef< unsignedgetDeclNumListsRef () const
 Get the number of lists per declaration that are in the trailing objects of the class. More...
 
void setDeclNumLists (ArrayRef< unsigned > DNLs)
 Set the number of lists per declaration that are in the trailing objects of the class. More...
 
MutableArrayRef< unsignedgetComponentListSizesRef ()
 Get the cumulative component lists sizes that are in the trailing objects of the class. More...
 
ArrayRef< unsignedgetComponentListSizesRef () const
 Get the cumulative component lists sizes that are in the trailing objects of the class. More...
 
void setComponentListSizes (ArrayRef< unsigned > CLSs)
 Set the cumulative component lists sizes that are in the trailing objects of the class. More...
 
MutableArrayRef< MappableComponentgetComponentsRef ()
 Get the components that are in the trailing objects of the class. More...
 
ArrayRef< MappableComponentgetComponentsRef () const
 Get the components that are in the trailing objects of the class. More...
 
void setComponents (ArrayRef< MappableComponent > Components, ArrayRef< unsigned > CLSs)
 Set the components that are in the trailing objects of the class. More...
 
void setClauseInfo (ArrayRef< ValueDecl * > Declarations, MappableExprComponentListsRef ComponentLists)
 Fill the clause information from the list of declarations and associated component lists. More...
 
void setMapperQualifierLoc (NestedNameSpecifierLoc NNSL)
 Set the nested name specifier of associated user-defined mapper. More...
 
void setMapperIdInfo (DeclarationNameInfo MapperId)
 Set the name of associated user-defined mapper. More...
 
MutableArrayRef< Expr * > getUDMapperRefs ()
 Get the user-defined mapper references that are in the trailing objects of the class. More...
 
ArrayRef< Expr * > getUDMapperRefs () const
 Get the user-defined mappers references that are in the trailing objects of the class. More...
 
void setUDMapperRefs (ArrayRef< Expr * > DMDs)
 Set the user-defined mappers that are in the trailing objects of the class. More...
 
- Protected Member Functions inherited from clang::OMPVarListClause< T >
 OMPVarListClause (OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, unsigned N)
 Build a clause with N variables. More...
 
MutableArrayRef< Expr * > getVarRefs ()
 Fetches list of variables associated with this clause. More...
 
void setVarRefs (ArrayRef< Expr * > VL)
 Sets the list of variables for this clause. More...
 
- Protected Member Functions inherited from clang::OMPClause
 OMPClause (OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation EndLoc)
 

Friends

class OMPClauseReader
 

Additional Inherited Members

- Static Public Member Functions inherited from clang::OMPClause
static bool classof (const OMPClause *)
 
- Static Protected Member Functions inherited from clang::OMPClauseMappableExprCommon
static unsigned getComponentsTotalNumber (MappableExprComponentListsRef ComponentLists)
 
static unsigned getUniqueDeclarationsTotalNumber (ArrayRef< const ValueDecl * > Declarations)
 

Detailed Description

template<class T>
class clang::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 4915 of file OpenMPClause.h.

Member Typedef Documentation

◆ const_all_components_iterator

Definition at line 5435 of file OpenMPClause.h.

◆ const_all_components_range

template<class T >
using clang::OMPMappableExprListClause< T >::const_all_components_range = llvm::iterator_range<const_all_components_iterator>

Definition at line 5437 of file OpenMPClause.h.

◆ const_all_decls_iterator

template<class T >
using clang::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 5409 of file OpenMPClause.h.

◆ const_all_decls_range

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

Definition at line 5410 of file OpenMPClause.h.

◆ const_all_lists_sizes_iterator

Definition at line 5426 of file OpenMPClause.h.

◆ const_all_lists_sizes_range

Definition at line 5428 of file OpenMPClause.h.

◆ const_all_num_lists_iterator

Definition at line 5417 of file OpenMPClause.h.

◆ const_all_num_lists_range

template<class T >
using clang::OMPMappableExprListClause< T >::const_all_num_lists_range = llvm::iterator_range<const_all_num_lists_iterator>

Definition at line 5419 of file OpenMPClause.h.

◆ const_component_lists_range

Definition at line 5371 of file OpenMPClause.h.

◆ mapperlist_const_iterator

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

Definition at line 5445 of file OpenMPClause.h.

◆ mapperlist_const_range

template<class T >
using clang::OMPMappableExprListClause< T >::mapperlist_const_range = llvm::iterator_range<mapperlist_const_iterator>

Definition at line 5448 of file OpenMPClause.h.

◆ mapperlist_iterator

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

Definition at line 5444 of file OpenMPClause.h.

◆ mapperlist_range

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

Definition at line 5446 of file OpenMPClause.h.

Constructor & Destructor Documentation

◆ OMPMappableExprListClause()

template<class T >
clang::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 4958 of file OpenMPClause.h.

Member Function Documentation

◆ all_components()

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

Definition at line 5439 of file OpenMPClause.h.

◆ all_decls()

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

Definition at line 5412 of file OpenMPClause.h.

◆ all_lists_sizes()

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

Definition at line 5430 of file OpenMPClause.h.

◆ all_num_lists()

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

Definition at line 5421 of file OpenMPClause.h.

◆ component_lists()

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

Definition at line 5387 of file OpenMPClause.h.

◆ component_lists_begin()

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

Iterators for all component lists.

Definition at line 5374 of file OpenMPClause.h.

Referenced by clang::OMPMappableExprListClause< OMPIsDevicePtrClause >::component_lists().

◆ component_lists_end()

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

◆ decl_component_lists()

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

Definition at line 5403 of file OpenMPClause.h.

◆ decl_component_lists_begin()

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

Iterators for component lists associated with the provided declaration.

Definition at line 5394 of file OpenMPClause.h.

Referenced by clang::OMPMappableExprListClause< OMPIsDevicePtrClause >::decl_component_lists().

◆ decl_component_lists_end()

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

◆ getComponentListSizesRef() [1/2]

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

◆ getComponentListSizesRef() [2/2]

template<class T >
ArrayRef<unsigned> clang::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 5034 of file OpenMPClause.h.

◆ getComponentsRef() [1/2]

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

◆ getComponentsRef() [2/2]

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

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

Definition at line 5058 of file OpenMPClause.h.

◆ getDeclNumListsRef() [1/2]

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

◆ getDeclNumListsRef() [2/2]

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

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

Definition at line 5009 of file OpenMPClause.h.

◆ getMapperIdInfo()

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

Gets the name info for associated user-defined mapper.

Definition at line 5212 of file OpenMPClause.h.

◆ getMapperQualifierLoc()

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

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

Definition at line 5207 of file OpenMPClause.h.

◆ getTotalComponentListNum()

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

Return the number of lists derived from the clause expressions.

Definition at line 5200 of file OpenMPClause.h.

◆ getTotalComponentsNum()

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

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

Definition at line 5204 of file OpenMPClause.h.

◆ getUDMapperRefs() [1/2]

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

◆ getUDMapperRefs() [2/2]

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

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

Definition at line 5176 of file OpenMPClause.h.

◆ getUniqueDeclarationsNum()

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

Return the number of unique base declarations in this clause.

Definition at line 5197 of file OpenMPClause.h.

◆ getUniqueDeclsRef() [1/2]

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

◆ getUniqueDeclsRef() [2/2]

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

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

Definition at line 4984 of file OpenMPClause.h.

◆ mapperlist_begin() [1/2]

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

◆ mapperlist_begin() [2/2]

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

Definition at line 5452 of file OpenMPClause.h.

◆ mapperlist_end() [1/2]

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

◆ mapperlist_end() [2/2]

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

Definition at line 5455 of file OpenMPClause.h.

◆ mapperlists() [1/2]

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

Definition at line 5458 of file OpenMPClause.h.

◆ mapperlists() [2/2]

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

Definition at line 5461 of file OpenMPClause.h.

◆ setClauseInfo()

template<class T >
void clang::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 5079 of file OpenMPClause.h.

Referenced by clang::OMPMapClause::Create(), clang::OMPUseDevicePtrClause::Create(), and clang::OMPIsDevicePtrClause::Create().

◆ setComponentListSizes()

template<class T >
void clang::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 5043 of file OpenMPClause.h.

◆ setComponents()

template<class T >
void clang::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 5068 of file OpenMPClause.h.

◆ setDeclNumLists()

template<class T >
void clang::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 5017 of file OpenMPClause.h.

◆ setMapperIdInfo()

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

Set the name of associated user-defined mapper.

Definition at line 5159 of file OpenMPClause.h.

◆ setMapperQualifierLoc()

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

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

Definition at line 5154 of file OpenMPClause.h.

◆ setUDMapperRefs()

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

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

Definition at line 5187 of file OpenMPClause.h.

Referenced by clang::OMPMapClause::Create().

◆ setUniqueDecls()

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

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

Definition at line 4993 of file OpenMPClause.h.

Friends And Related Function Documentation

◆ OMPClauseReader

template<class T >
friend class OMPClauseReader
friend

Definition at line 4917 of file OpenMPClause.h.


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