OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{QueryTemplateGenerator.cpp}::Params< NTYPES > Class Template Reference

Public Member Functions

 Params (llvm::Module const *const mod)
 
template<typename... ATTRS>
void addAttributes (unsigned const index, ATTRS const ...attrs)
 
llvm::AttributeList attributeList () const
 
template<typename... ATTRS>
void pushBack (llvm::Type *const type, char const *const name, ATTRS const ...attrs)
 
void setNames (llvm::Function::arg_iterator itr) const
 
auto & types ()
 

Private Attributes

llvm::Module const *const mod_
 
llvm::SmallVector< llvm::Type
*, NTYPES > 
types_
 
llvm::SmallVector< char const
*, NTYPES > 
names_
 
llvm::SmallVector
< llvm::AttributeList, NTYPES+1 > 
attrs_
 

Detailed Description

template<size_t NTYPES>
class anonymous_namespace{QueryTemplateGenerator.cpp}::Params< NTYPES >

Definition at line 50 of file QueryTemplateGenerator.cpp.

Constructor & Destructor Documentation

template<size_t NTYPES>
anonymous_namespace{QueryTemplateGenerator.cpp}::Params< NTYPES >::Params ( llvm::Module const *const  mod)
inline

Definition at line 58 of file QueryTemplateGenerator.cpp.

Member Function Documentation

template<size_t NTYPES>
template<typename... ATTRS>
void anonymous_namespace{QueryTemplateGenerator.cpp}::Params< NTYPES >::addAttributes ( unsigned const  index,
ATTRS const ...  attrs 
)
inline

Definition at line 61 of file QueryTemplateGenerator.cpp.

References anonymous_namespace{QueryTemplateGenerator.cpp}::make_attribute_list().

Referenced by anonymous_namespace{QueryTemplateGenerator.cpp}::make_params().

61  {
62  static_assert((std::is_same_v<llvm::Attribute::AttrKind, ATTRS> && ...));
63  attrs_.push_back(make_attribute_list(mod_, index, attrs...));
64  }
llvm::SmallVector< llvm::AttributeList, NTYPES+1 > attrs_
llvm::AttributeList make_attribute_list(llvm::Module const *const mod, unsigned const index, ATTRS const ...attrs)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<size_t NTYPES>
llvm::AttributeList anonymous_namespace{QueryTemplateGenerator.cpp}::Params< NTYPES >::attributeList ( ) const
inline

Definition at line 66 of file QueryTemplateGenerator.cpp.

66  {
67  return llvm::AttributeList::get(mod_->getContext(), attrs_);
68  }
llvm::SmallVector< llvm::AttributeList, NTYPES+1 > attrs_
template<size_t NTYPES>
template<typename... ATTRS>
void anonymous_namespace{QueryTemplateGenerator.cpp}::Params< NTYPES >::pushBack ( llvm::Type *const  type,
char const *const  name,
ATTRS const ...  attrs 
)
inline

Definition at line 71 of file QueryTemplateGenerator.cpp.

Referenced by anonymous_namespace{QueryTemplateGenerator.cpp}::make_params().

71  {
72  static_assert((std::is_same_v<llvm::Attribute::AttrKind, ATTRS> && ...));
73  types_.push_back(type);
74  names_.push_back(name);
75  if constexpr (0u < sizeof...(ATTRS)) {
76  static_assert(1u == llvm::AttributeList::AttrIndex::FirstArgIndex);
77  addAttributes(types_.size(), attrs...);
78  }
79  }
void addAttributes(unsigned const index, ATTRS const ...attrs)
string name
Definition: setup.in.py:72

+ Here is the caller graph for this function:

template<size_t NTYPES>
void anonymous_namespace{QueryTemplateGenerator.cpp}::Params< NTYPES >::setNames ( llvm::Function::arg_iterator  itr) const
inline

Definition at line 81 of file QueryTemplateGenerator.cpp.

References setup::name.

81  {
82  for (char const* const name : names_) {
83  itr++->setName(name);
84  }
85  }
string name
Definition: setup.in.py:72
template<size_t NTYPES>
auto& anonymous_namespace{QueryTemplateGenerator.cpp}::Params< NTYPES >::types ( )
inline

Definition at line 87 of file QueryTemplateGenerator.cpp.

87 { return types_; }

Member Data Documentation

template<size_t NTYPES>
llvm::SmallVector<llvm::AttributeList, NTYPES + 1> anonymous_namespace{QueryTemplateGenerator.cpp}::Params< NTYPES >::attrs_
private

Definition at line 55 of file QueryTemplateGenerator.cpp.

template<size_t NTYPES>
llvm::Module const* const anonymous_namespace{QueryTemplateGenerator.cpp}::Params< NTYPES >::mod_
private

Definition at line 51 of file QueryTemplateGenerator.cpp.

template<size_t NTYPES>
llvm::SmallVector<char const*, NTYPES> anonymous_namespace{QueryTemplateGenerator.cpp}::Params< NTYPES >::names_
private

Definition at line 53 of file QueryTemplateGenerator.cpp.

template<size_t NTYPES>
llvm::SmallVector<llvm::Type*, NTYPES> anonymous_namespace{QueryTemplateGenerator.cpp}::Params< NTYPES >::types_
private

Definition at line 52 of file QueryTemplateGenerator.cpp.


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