Issue 144993
Summary [mlir] OptionalProp<IntProp<uint8_t>> printout empty for 0 and similar values.
Labels mlir
Assignees
Reporter peledins-zimperium
    We have in our op:

```
arguments = (ins OptionalProp<IntProp<"uint8_t">>:$stuff)
...
let assemblyFormat = [{
 $op (`stuff` $stuff^)?
    }];
```

When serializing this for `stuff==0` we get printout of 
```
stuff
```

In generated code:
` _odsPrinter << (*(getProperties().stuff));`
which maps to:
```
 raw_ostream &operator<<(unsigned char C) {
    if (OutBufCur >= OutBufEnd)
 return write(C);
    *OutBufCur++ = C;
    return *this;
 }
```

So it ends up printing \0 instead of 0.

uint16_t works, int8_t does not.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to