[Mlir-commits] [mlir] [mlir] Fix build (PR #113750)

Matthias Springer llvmlistbot at llvm.org
Fri Oct 25 19:04:57 PDT 2024


https://github.com/matthias-springer created https://github.com/llvm/llvm-project/pull/113750

```
mlir/lib/Transforms/Utils/DialectConversion.cpp:2851:28: error: call of overloaded ‘TypeRange(llvm::SmallVector<mlir::Value>&)’ is ambiguous
     assert(TypeRange(result) == resultTypes &&
```


>From 0388089c89ee873932227f49bcd33adc2b36bd94 Mon Sep 17 00:00:00 2001
From: Matthias Springer <mspringer at nvidia.com>
Date: Sat, 26 Oct 2024 04:03:29 +0200
Subject: [PATCH] [mlir] Fix build

---
 mlir/lib/Transforms/Utils/DialectConversion.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp
index 3d0c81867e0cc2..9f8a482d6e2d22 100644
--- a/mlir/lib/Transforms/Utils/DialectConversion.cpp
+++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp
@@ -2848,7 +2848,7 @@ SmallVector<Value> TypeConverter::materializeTargetConversion(
         fn(builder, resultTypes, inputs, loc, originalType);
     if (result.empty())
       continue;
-    assert(TypeRange(result) == resultTypes &&
+    assert(TypeRange(ValueRange(result)) == resultTypes &&
            "callback produced incorrect number of values or values with "
            "incorrect types");
     return result;



More information about the Mlir-commits mailing list