[Mlir-commits] [mlir] Add missing declarations of explicit template instantiations. (PR #86591)

Thomas Köppe llvmlistbot at llvm.org
Mon Mar 25 15:28:33 PDT 2024


https://github.com/tkoeppe created https://github.com/llvm/llvm-project/pull/86591

Found with `-Wundefined-func-template`.

>From f3e5796e42458953640b147522ef3511e59c3bb0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= <tkoeppe at google.com>
Date: Mon, 25 Mar 2024 22:26:53 +0000
Subject: [PATCH] Add missing declarations of explicit template instantiations.

Found with -Wundefined-func-template.
---
 mlir/include/mlir/Analysis/Presburger/Matrix.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mlir/include/mlir/Analysis/Presburger/Matrix.h b/mlir/include/mlir/Analysis/Presburger/Matrix.h
index 4484ebc747e61c..c20a7bcecd52dc 100644
--- a/mlir/include/mlir/Analysis/Presburger/Matrix.h
+++ b/mlir/include/mlir/Analysis/Presburger/Matrix.h
@@ -244,6 +244,9 @@ class Matrix {
   SmallVector<T, 16> data;
 };
 
+extern template class Matrix<MPInt>;
+extern template class Matrix<Fraction>;
+
 // An inherited class for integer matrices, with no new data attributes.
 // This is only used for the matrix-related methods which apply only
 // to integers (hermite normal form computation and row normalisation).



More information about the Mlir-commits mailing list