24#ifndef LLVM_IR_SYMBOLTABLELISTTRAITS_H
25#define LLVM_IR_SYMBOLTABLELISTTRAITS_H
41class ValueSymbolTable;
49#define DEFINE_SYMBOL_TABLE_PARENT_TYPE(NODE, PARENT) \
50 template <> struct SymbolTableListParentType<NODE> { using type = PARENT; };
58#undef DEFINE_SYMBOL_TABLE_PARENT_TYPE
60template <
typename NodeTy>
class SymbolTableList;
65template <
typename ValueSubClass>
69 using ItemParentClass =
78 ItemParentClass *getListOwner() {
79 size_t Offset =
reinterpret_cast<size_t>(
80 &((ItemParentClass *)nullptr->*ItemParentClass::getSublistAccess(
81 static_cast<ValueSubClass *
>(
84 return reinterpret_cast<ItemParentClass*
>(
reinterpret_cast<char*
>(Anchor)-
88 static ListTy &getList(ItemParentClass *Par) {
89 return Par->*(Par->getSublistAccess((ValueSubClass*)
nullptr));
92 static ValueSymbolTable *getSymTab(ItemParentClass *Par) {
93 return Par ?
toPtr(Par->getValueSymbolTable()) : nullptr;
102 template<
typename TPtr>
115 :
public iplist_impl<simple_ilist<T>, SymbolTableListTraits<T>> {};
Machine Check Debug Module
#define DEFINE_SYMBOL_TABLE_PARENT_TYPE(NODE, PARENT)
SymbolTableListTraits()=default
void removeNodeFromList(ValueSubClass *V)
static ValueSymbolTable * toPtr(ValueSymbolTable *P)
void addNodeToList(ValueSubClass *V)
void transferNodesFromList(SymbolTableListTraits &L2, iterator first, iterator last)
void setSymTabObject(TPtr *, TPtr)
setSymTabObject - This is called when (f.e.) the parent of a basic block changes.
static ValueSymbolTable * toPtr(ValueSymbolTable &R)
List that automatically updates parent links and symbol tables.
This class provides a symbol table of name/value pairs.
Iterator for intrusive lists based on ilist_node.
A wrapper around an intrusive list with callbacks and non-intrusive ownership.
This file defines classes to implement an intrusive doubly linked list class (i.e.
@ BasicBlock
Various leaf nodes.
This is an optimization pass for GlobalISel generic memory operations.
Template metafunction to get the parent type for a symbol table list.
Use delete by default for iplist and ilist.