diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/IR/BasicBlock.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/Function.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/IR/Module.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/IR/SymbolTableListTraitsImpl.h | 30 |
4 files changed, 20 insertions, 22 deletions
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp index 97e4da41ea9..02e07eb5bb5 100644 --- a/llvm/lib/IR/BasicBlock.cpp +++ b/llvm/lib/IR/BasicBlock.cpp @@ -36,7 +36,7 @@ LLVMContext &BasicBlock::getContext() const { // Explicit instantiation of SymbolTableListTraits since some of the methods // are not in the public header file... -template class llvm::SymbolTableListTraits<Instruction, BasicBlock>; +template class llvm::SymbolTableListTraits<Instruction>; BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent, BasicBlock *InsertBefore) diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index 5e4c8ecbd22..3935a33d170 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -35,8 +35,8 @@ using namespace llvm; // Explicit instantiations of SymbolTableListTraits since some of the methods // are not in the public header file... -template class llvm::SymbolTableListTraits<Argument, Function>; -template class llvm::SymbolTableListTraits<BasicBlock, Function>; +template class llvm::SymbolTableListTraits<Argument>; +template class llvm::SymbolTableListTraits<BasicBlock>; //===----------------------------------------------------------------------===// // Argument Implementation diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp index 49586f42e10..21dfb0912fc 100644 --- a/llvm/lib/IR/Module.cpp +++ b/llvm/lib/IR/Module.cpp @@ -38,9 +38,9 @@ using namespace llvm; // Explicit instantiations of SymbolTableListTraits since some of the methods // are not in the public header file. -template class llvm::SymbolTableListTraits<Function, Module>; -template class llvm::SymbolTableListTraits<GlobalVariable, Module>; -template class llvm::SymbolTableListTraits<GlobalAlias, Module>; +template class llvm::SymbolTableListTraits<Function>; +template class llvm::SymbolTableListTraits<GlobalVariable>; +template class llvm::SymbolTableListTraits<GlobalAlias>; //===----------------------------------------------------------------------===// // Primitive Module methods. diff --git a/llvm/lib/IR/SymbolTableListTraitsImpl.h b/llvm/lib/IR/SymbolTableListTraitsImpl.h index 4d17d75859c..e7fa8ba58f4 100644 --- a/llvm/lib/IR/SymbolTableListTraitsImpl.h +++ b/llvm/lib/IR/SymbolTableListTraitsImpl.h @@ -24,10 +24,10 @@ namespace llvm { /// setSymTabObject - This is called when (f.e.) the parent of a basic block /// changes. This requires us to remove all the instruction symtab entries from /// the current function and reinsert them into the new function. -template<typename ValueSubClass, typename ItemParentClass> -template<typename TPtr> -void SymbolTableListTraits<ValueSubClass,ItemParentClass> -::setSymTabObject(TPtr *Dest, TPtr Src) { +template <typename ValueSubClass> +template <typename TPtr> +void SymbolTableListTraits<ValueSubClass>::setSymTabObject(TPtr *Dest, + TPtr Src) { // Get the old symtab and value list before doing the assignment. ValueSymbolTable *OldST = getSymTab(getListOwner()); @@ -41,7 +41,7 @@ void SymbolTableListTraits<ValueSubClass,ItemParentClass> if (OldST == NewST) return; // Move all the elements from the old symtab to the new one. - iplist<ValueSubClass> &ItemList = getList(getListOwner()); + ListTy &ItemList = getList(getListOwner()); if (ItemList.empty()) return; if (OldST) { @@ -60,9 +60,8 @@ void SymbolTableListTraits<ValueSubClass,ItemParentClass> } -template<typename ValueSubClass, typename ItemParentClass> -void SymbolTableListTraits<ValueSubClass,ItemParentClass> -::addNodeToList(ValueSubClass *V) { +template <typename ValueSubClass> +void SymbolTableListTraits<ValueSubClass>::addNodeToList(ValueSubClass *V) { assert(!V->getParent() && "Value already in a container!!"); ItemParentClass *Owner = getListOwner(); V->setParent(Owner); @@ -71,20 +70,19 @@ void SymbolTableListTraits<ValueSubClass,ItemParentClass> ST->reinsertValue(V); } -template<typename ValueSubClass, typename ItemParentClass> -void SymbolTableListTraits<ValueSubClass,ItemParentClass> -::removeNodeFromList(ValueSubClass *V) { +template <typename ValueSubClass> +void SymbolTableListTraits<ValueSubClass>::removeNodeFromList( + ValueSubClass *V) { V->setParent(nullptr); if (V->hasName()) if (ValueSymbolTable *ST = getSymTab(getListOwner())) ST->removeValueName(V->getValueName()); } -template<typename ValueSubClass, typename ItemParentClass> -void SymbolTableListTraits<ValueSubClass,ItemParentClass> -::transferNodesFromList(ilist_traits<ValueSubClass> &L2, - ilist_iterator<ValueSubClass> first, - ilist_iterator<ValueSubClass> last) { +template <typename ValueSubClass> +void SymbolTableListTraits<ValueSubClass>::transferNodesFromList( + SymbolTableListTraits &L2, ilist_iterator<ValueSubClass> first, + ilist_iterator<ValueSubClass> last) { // We only have to do work here if transferring instructions between BBs ItemParentClass *NewIP = getListOwner(), *OldIP = L2.getListOwner(); if (NewIP == OldIP) return; // No work to do at all... |