clang  6.0.0svn
Classes | Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
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 OMPMappableExprListClause< T >:
Inheritance graph
[legend]
Collaboration diagram for 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 >
 
- 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. 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...
 
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
 

Protected Member Functions

 OMPMappableExprListClause (OpenMPClauseKind K, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, unsigned NumVars, unsigned NumUniqueDeclarations, unsigned NumComponentLists, unsigned NumComponents)
 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< unsigned > getDeclNumListsRef ()
 Get the number of lists per declaration that are in the trailing objects of the class. More...
 
ArrayRef< unsigned > getDeclNumListsRef () 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< unsigned > getComponentListSizesRef ()
 Get the cumulative component lists sizes that are in the trailing objects of the class. More...
 
ArrayRef< unsigned > getComponentListSizesRef () 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...
 

Friends

class OMPClauseReader
 

Additional Inherited Members

- Static Protected Member Functions inherited from OMPClauseMappableExprCommon
static unsigned getComponentsTotalNumber (MappableExprComponentListsRef ComponentLists)
 
static unsigned getUniqueDeclarationsTotalNumber (ArrayRef< 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 3347 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 3768 of file OpenMPClause.h.

◆ const_all_components_range

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

Definition at line 3770 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 3742 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 3743 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 3759 of file OpenMPClause.h.

◆ const_all_lists_sizes_range

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

Definition at line 3761 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 3750 of file OpenMPClause.h.

◆ const_all_num_lists_range

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

Definition at line 3752 of file OpenMPClause.h.

◆ const_component_lists_range

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

Definition at line 3707 of file OpenMPClause.h.

Constructor & Destructor Documentation

◆ OMPMappableExprListClause()

template<class T>
OMPMappableExprListClause< T >::OMPMappableExprListClause ( OpenMPClauseKind  K,
SourceLocation  StartLoc,
SourceLocation  LParenLoc,
SourceLocation  EndLoc,
unsigned  NumVars,
unsigned  NumUniqueDeclarations,
unsigned  NumComponentLists,
unsigned  NumComponents 
)
inlineprotected

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

Parameters
KKind of the clause.
StartLocStarting location of the clause (the clause keyword).
LParenLocLocation of '('.
EndLocEnding location of the clause.
NumVarsNumber of expressions listed in the clause.
NumUniqueDeclarationsNumber of unique base declarations in this clause.
NumComponentListsNumber of component lists in this clause - one list for each expression in the clause.
NumComponentsTotal number of expression components in the clause.

Definition at line 3375 of file OpenMPClause.h.

Member Function Documentation

◆ all_components()

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

◆ all_decls()

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

◆ all_lists_sizes()

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

◆ all_num_lists()

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

◆ component_lists()

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

Definition at line 3721 of file OpenMPClause.h.

◆ 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 3710 of file OpenMPClause.h.

◆ component_lists_end()

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

Definition at line 3715 of file OpenMPClause.h.

◆ decl_component_lists()

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

Definition at line 3736 of file OpenMPClause.h.

◆ 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 3728 of file OpenMPClause.h.

◆ decl_component_lists_end()

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

Definition at line 3733 of file OpenMPClause.h.

◆ 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 3434 of file OpenMPClause.h.

◆ 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 3443 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 3459 of file OpenMPClause.h.

◆ 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 3467 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 3410 of file OpenMPClause.h.

◆ 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 3418 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 3567 of file OpenMPClause.h.

Referenced by clang::OMPClauseWriter::VisitOMPClauseWithPostUpdate().

◆ 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 3571 of file OpenMPClause.h.

Referenced by clang::OMPClauseWriter::VisitOMPClauseWithPostUpdate().

◆ getUniqueDeclarationsNum()

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

Return the number of unique base declarations in this clause.

Definition at line 3564 of file OpenMPClause.h.

Referenced by clang::OMPClauseWriter::VisitOMPClauseWithPostUpdate().

◆ 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 3385 of file OpenMPClause.h.

◆ 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 3393 of file OpenMPClause.h.

◆ 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 3488 of file OpenMPClause.h.

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

◆ 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 3452 of file OpenMPClause.h.

◆ 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 3477 of file OpenMPClause.h.

◆ 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 3426 of file OpenMPClause.h.

◆ 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 3402 of file OpenMPClause.h.

Friends And Related Function Documentation

◆ OMPClauseReader

template<class T>
friend class OMPClauseReader
friend

Definition at line 3349 of file OpenMPClause.h.


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