aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/BinaryStreamWriter.cpp
diff options
context:
space:
mode:
authorJacques Pienaar <jpienaar@google.com>2024-05-15 03:25:51 -0700
committerGitHub <noreply@github.com>2024-05-15 03:25:51 -0700
commite67080df999c035d764c42aaa6d85417331ac52c (patch)
tree41e9468af2a6cf2729a770a814f55bda75730ae0 /llvm/lib/Support/BinaryStreamWriter.cpp
parent03bdfb65617e3cf714a106fdf7a6ae7551d17bce (diff)
downloadllvm-e67080df999c035d764c42aaa6d85417331ac52c.zip
llvm-e67080df999c035d764c42aaa6d85417331ac52c.tar.gz
llvm-e67080df999c035d764c42aaa6d85417331ac52c.tar.bz2
[mlir][ods] Populate properties in generated builder (#90430)
Previously this was only populated in the create method later. This resolves some of invalid builder paths. This may also be sufficient that type inference functions no longer have to consider whether property conversion has happened (but haven't verified that yet). This also makes Attributes corresponding to Properties as optional inside the set from attributes method. Today that is in effect what happens with Property value initialization and folks use it to define custom C++ types whose default initialization is what they want. This is the behavior users get if they use properties directly. Propagating Attributes without allowing partial setting would require iterating over the dictionary attribute considering the properties of the op type that will be created. This could also have been an additional method generated or optional behavior on the set method. But doing it consistently seems better. In terms of whats lost, it doesn't seem like anything compared to the pure Property path where Property is default value initialized and then partially overwritten (this doesn't seem to buy anything else verification wise). Default valued Properties (as specified ODS side rather than C++ side) triggered error as the containing class was not yet complete but referenced nested class, so that we couldn't have default initializer for them in the parent class. Added an additional forwarding builder to avoid needing to update call sites. This could be split out to separate change. Inlined templated function in unit test that was only used once. Moved initialization earlier where seen.
Diffstat (limited to 'llvm/lib/Support/BinaryStreamWriter.cpp')
0 files changed, 0 insertions, 0 deletions