[Mlir-commits] [mlir] [mlir][emitc] Add EmitC index types (PR #93155)

Simon Camphausen llvmlistbot at llvm.org
Thu May 23 05:11:11 PDT 2024


================
@@ -1570,6 +1570,10 @@ LogicalResult CppEmitter::emitType(Location loc, Type type) {
   }
   if (auto iType = dyn_cast<IndexType>(type))
     return (os << "size_t"), success();
+  if (auto iType = dyn_cast<emitc::SizeTType>(type))
+    return (os << "size_t"), success();
+  if (auto iType = dyn_cast<emitc::SignedSizeTType>(type))
+    return (os << "ssize_t"), success();
----------------
simon-camp wrote:

```suggestion
  if (auto sType = dyn_cast<emitc::SizeTType>(type))
    return (os << "size_t"), success();
  if (auto sType = dyn_cast<emitc::SignedSizeTType>(type))
    return (os << "ssize_t"), success();
```

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


More information about the Mlir-commits mailing list