Add explicit template instantiation declarations for existing explicit definitions.
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 23 Dec 2022 20:07:02 +0000 (20:07 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 23 Dec 2022 20:07:59 +0000 (20:07 +0000)
Explicit instantiations should be declared. Found with -Wundefined-func-template.

Reviewed By: dblaikie, rriddle

Differential Revision: https://reviews.llvm.org/D140594

mlir/include/mlir/IR/Dominance.h

index d94d5be..30f5674 100644 (file)
@@ -24,6 +24,7 @@
 
 extern template class llvm::DominatorTreeBase<mlir::Block, false>;
 extern template class llvm::DominatorTreeBase<mlir::Block, true>;
+extern template class llvm::DomTreeNodeBase<mlir::Block>;
 
 namespace mlir {
 using DominanceInfoNode = llvm::DomTreeNodeBase<Block>;
@@ -109,6 +110,9 @@ protected:
   mutable DenseMap<Region *, llvm::PointerIntPair<DomTree *, 1, bool>>
       dominanceInfos;
 };
+
+extern template class DominanceInfoBase</*IsPostDom=*/true>;
+extern template class DominanceInfoBase</*IsPostDom=*/false>;
 } // namespace detail
 
 /// A class for computing basic dominance information. Note that this