aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/IR/SymbolTableListTraits.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/SymbolTableListTraits.h')
-rw-r--r--include/llvm/IR/SymbolTableListTraits.h28
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