diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
commit | 71d5a2540a98c81f5bcaeb48805e0e2881f530ef (patch) | |
tree | 5343938942df402b49ec7300a1c25a2d4ccd5821 /include/llvm/IR/SymbolTableListTraits.h | |
parent | 31bbf64f3a4974a2d6c8b3b27ad2f519caf74057 (diff) |
Diffstat (limited to 'include/llvm/IR/SymbolTableListTraits.h')
-rw-r--r-- | include/llvm/IR/SymbolTableListTraits.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/include/llvm/IR/SymbolTableListTraits.h b/include/llvm/IR/SymbolTableListTraits.h index 5c6d58affd7a..49a5fb21297d 100644 --- a/include/llvm/IR/SymbolTableListTraits.h +++ b/include/llvm/IR/SymbolTableListTraits.h @@ -1,4 +1,4 @@ -//===-- llvm/SymbolTableListTraits.h - Traits for iplist --------*- C++ -*-===// +//===- llvm/SymbolTableListTraits.h - Traits for iplist ---------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -26,23 +26,27 @@ #define LLVM_IR_SYMBOLTABLELISTTRAITS_H #include "llvm/ADT/ilist.h" +#include "llvm/ADT/simple_ilist.h" +#include <cstddef> namespace llvm { -class ValueSymbolTable; -/// Template metafunction to get the parent type for a symbol table list. -/// -/// Implementations create a typedef called \c type so that we only need a -/// single template parameter for the list and traits. -template <typename NodeTy> struct SymbolTableListParentType {}; class Argument; class BasicBlock; class Function; -class Instruction; -class GlobalVariable; class GlobalAlias; class GlobalIFunc; +class GlobalVariable; +class Instruction; class Module; +class ValueSymbolTable; + +/// Template metafunction to get the parent type for a symbol table list. +/// +/// Implementations create a typedef called \c type so that we only need a +/// single template parameter for the list and traits. +template <typename NodeTy> struct SymbolTableListParentType {}; + #define DEFINE_SYMBOL_TABLE_PARENT_TYPE(NODE, PARENT) \ template <> struct SymbolTableListParentType<NODE> { typedef PARENT type; }; DEFINE_SYMBOL_TABLE_PARENT_TYPE(Instruction, BasicBlock) @@ -67,7 +71,7 @@ class SymbolTableListTraits : public ilist_alloc_traits<ValueSubClass> { typename SymbolTableListParentType<ValueSubClass>::type ItemParentClass; public: - SymbolTableListTraits() {} + SymbolTableListTraits() = default; private: /// getListOwner - Return the object that owns this list. If this is a list @@ -109,6 +113,6 @@ template <class T> class SymbolTableList : public iplist_impl<simple_ilist<T>, SymbolTableListTraits<T>> {}; -} // End llvm namespace +} // end namespace llvm -#endif +#endif // LLVM_IR_SYMBOLTABLELISTTRAITS_H |