[Mlir-commits] [mlir] [MLIR][NFC] Fix tgfmt compilation with MSVC (PR #209446)

Alexis Engelke llvmlistbot at llvm.org
Tue Jul 14 04:28:59 PDT 2026


https://github.com/aengelke created https://github.com/llvm/llvm-project/pull/209446

Apparently older MSVC has problems with inferring template argument
types. Provide them explicitly.

Fixes https://github.com/llvm/llvm-project/issues/209303.


>From d2804df44de484dc3aea62b310ef7c9c61657012 Mon Sep 17 00:00:00 2001
From: Alexis Engelke <engelke at in.tum.de>
Date: Tue, 14 Jul 2026 11:28:19 +0000
Subject: [PATCH] [spr] initial version

Created using spr 1.3.8-wip
---
 mlir/include/mlir/TableGen/Format.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mlir/include/mlir/TableGen/Format.h b/mlir/include/mlir/TableGen/Format.h
index daadf8e636feb..bdecf491faf21 100644
--- a/mlir/include/mlir/TableGen/Format.h
+++ b/mlir/include/mlir/TableGen/Format.h
@@ -254,13 +254,13 @@ class FmtStrVecObject : public FmtObjectBase {
 template <typename... Ts>
 inline auto tgfmt(StringRef fmt, const FmtContext *ctx, Ts &&...vals)
     -> FmtObject<decltype(std::make_tuple(
-        llvm::support::detail::FormatFunctor(std::forward<Ts>(vals))...))> {
+        llvm::support::detail::FormatFunctor<Ts>(std::forward<Ts>(vals))...))> {
   using ParamTuple = decltype(std::make_tuple(
-      llvm::support::detail::FormatFunctor(std::forward<Ts>(vals))...));
+      llvm::support::detail::FormatFunctor<Ts>(std::forward<Ts>(vals))...));
   return FmtObject<ParamTuple>(
       fmt, ctx,
       std::make_tuple(
-          llvm::support::detail::FormatFunctor(std::forward<Ts>(vals))...));
+          llvm::support::detail::FormatFunctor<Ts>(std::forward<Ts>(vals))...));
 }
 
 /// Like tgfmt, but take replacement parameters as an array of strings instead.



More information about the Mlir-commits mailing list