[Mlir-commits] [mlir] [mlir][spirv] Handle failed conversions of struct elements (PR #70005)

Victor Perez llvmlistbot at llvm.org
Tue Oct 24 05:46:15 PDT 2023


================
@@ -207,21 +219,19 @@ convertStructTypeWithOffset(spirv::StructType type,
   if (type != VulkanLayoutUtils::decorateType(type))
     return std::nullopt;
 
-  auto elementsVector = llvm::to_vector<8>(
-      llvm::map_range(type.getElementTypes(), [&](Type elementType) {
-        return converter.convertType(elementType);
-      }));
+  SmallVector<Type> elementsVector;
+  if (!convertTypes(converter, type.getElementTypes(), elementsVector))
----------------
victor-eds wrote:

Please use [`TypeConverter::convertTypes`](https://mlir.llvm.org/doxygen/classmlir_1_1TypeConverter.html#ad8a2339e9128e1b05df14b075f6c3914) instead

https://github.com/llvm/llvm-project/pull/70005


More information about the Mlir-commits mailing list