[Mlir-commits] [mlir] [mlir] Fix unqualified APInt in LoopLikeOpInterface tablegen (PR #159561)

Vladimír Štill llvmlistbot at llvm.org
Thu Sep 18 05:05:10 PDT 2025


https://github.com/vlstill created https://github.com/llvm/llvm-project/pull/159561

In the recent change adding `getStaticTripCount` there is an omitted namespace on `APInt` which means the build fails for projects using this interface outside of `llvm` namespace (or `using llvm::APInt`).

>From 26b32c0aa141095b01067293ee7182c5aba4f574 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Vladim=C3=ADr=20=C5=A0till?=
 <vladimir.still at nextsilicon.com>
Date: Thu, 18 Sep 2025 11:22:40 +0000
Subject: [PATCH] [mlir] Fix unqualified APInt in LoopLikeOpInterface tablegen

---
 mlir/include/mlir/Interfaces/LoopLikeInterface.td | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/include/mlir/Interfaces/LoopLikeInterface.td b/mlir/include/mlir/Interfaces/LoopLikeInterface.td
index cfd15a7746e19..e09b8672f2d08 100644
--- a/mlir/include/mlir/Interfaces/LoopLikeInterface.td
+++ b/mlir/include/mlir/Interfaces/LoopLikeInterface.td
@@ -236,7 +236,7 @@ def LoopLikeOpInterface : OpInterface<"LoopLikeOpInterface"> {
     InterfaceMethod<[{
         Compute the static trip count if possible.
       }],
-      /*retTy=*/"::std::optional<APInt>",
+      /*retTy=*/"::std::optional<::llvm::APInt>",
       /*methodName=*/"getStaticTripCount",
       /*args=*/(ins),
       /*methodBody=*/"",



More information about the Mlir-commits mailing list