Closed
Description
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.
For OptionalAttr<I8Attr>
this works as expected and prints 0.