[Mlir-commits] [mlir] TranslateToCpp: Emit floating point literals with suffix (PR #85392)
Simon Camphausen
llvmlistbot at llvm.org
Fri Mar 15 06:36:12 PDT 2024
================
@@ -1193,10 +1192,18 @@ LogicalResult CppEmitter::emitAttribute(Location loc, Attribute attr) {
// Print floating point attributes.
if (auto fAttr = dyn_cast<FloatAttr>(attr)) {
+ if (!fAttr.getType().isF32() && !fAttr.getType().isF64()) {
----------------
simon-camp wrote:
Maybe this is more readable (nit).
```suggestion
if (!isa<Float32Type, Float64Type>(fAttr.getType()) {
```
https://github.com/llvm/llvm-project/pull/85392
More information about the Mlir-commits
mailing list