diff --git a/llvm/include/llvm/IR/SymbolTableListTraits.h b/llvm/include/llvm/IR/SymbolTableListTraits.h index bd31fca5e525b..fcf6f0fb15280 100644 --- a/llvm/include/llvm/IR/SymbolTableListTraits.h +++ b/llvm/include/llvm/IR/SymbolTableListTraits.h @@ -106,6 +106,15 @@ class SymbolTableListTraits : public ilist_alloc_traits { static ValueSymbolTable *toPtr(ValueSymbolTable &R) { return &R; } }; +// The SymbolTableListTraits template is explicitly instantiated for the +// following data types, so add extern template statements to prevent implicit +// instantiation. +extern template class SymbolTableListTraits; +extern template class SymbolTableListTraits; +extern template class SymbolTableListTraits; +extern template class SymbolTableListTraits; +extern template class SymbolTableListTraits; + /// List that automatically updates parent links and symbol tables. /// /// When nodes are inserted into and removed from this list, the associated