Some stuff that was before implicitly checked during deserialization
now need explicit checks, those are introduced here.
This also fixes test failures related to the changed serialization
format (which fields can or cannot be omitted when they have
the default value).
This commit bans from the model pointer-to-array return types in
CABIFunctionDefinition.
CABIFunctionDefinition implies we're decompiling towards C, and C does
not support such return types, because it doesn't have valid syntax to
express them without using typedefs.
This commit bans from the model array types in as argument or return
types in CABIFunctionDefinition.
CABIFunctionDefinition implies we're decompiling towards C, and C does
not support array arguments (passed by copy) nor array return types.
Banning these from the model reduces the number of situations where we
have to emit artificial array wrappers (not present in the model) around
types when printing C code, simplifying the handling of such situations
when translating to clift and in general in the decompilation pipeline.
This reworks NameBuilder to ease the transition to the system where
the model will be guaranteed to never contain any name collisions, both
between user-specified names and the automatic ones.
This helps keeping track of them and making sure none of them is lost.
The order is bottom-to-top, so ends with `model::Binary::verify` and
contains verification of all of its dependencies in the order they
appear in their user's `verify`s, kind of like a flattened tree.