Visitor used to recursively traverse MIR types and evaluate FFI-safety.
It uses check_* methods as entrypoints to be called elsewhere,
and visit_* methods to recurse.
The uses_power_alignment lint detects specific repr(C)
aggregates on AIX.
In its platform C ABI, AIX uses the βpowerβ (as in PowerPC) alignment
rule (detailed in https://www.ibm.com/docs/en/xl-c-and-cpp-aix/16.1?topic=data-using-alignment-modes#alignment),
which can also be set for XLC by #pragma align(power) or
-qalign=power. Aggregates with a floating-point type as the
recursively first field (as in βat offset 0β) modify the layout of
subsequent fields of the associated structs to use an alignment value
where the floating-point type is aligned on a 4-byte boundary.
Check a struct definition for respect of the Power alignment Rule (as in PowerPC),
which should be respected in the βaixβ target OS.
To do so, we must follow one of the two following conditions:
The result when a type has been checked but perhaps not completely. None indicates that
FFI safety/unsafety has not yet been determined, Some(res) indicates that the safety/unsafety
in the FfiResult is final.