In D79719, LayoutField was refactored to fetch the size of field
types in bits and then convert to chars, rather than fetching
them in chars directly. This is not ideal, since it makes the
calculations char size dependent, and breaks for sizes that
are not a multiple of the char size.
This patch changes it to use getTypeInfoInChars instead of
getTypeInfo.
In most cases, getTypeInfoInChars invokes getTypeInfo underneath. So to make people be careful about this, I would suggest to leave a comment explaining/claiming we have to call getTypeInfoInChars here. And also maybe adding a testcase to guard the scenario you were talking about would be helpful to prevent someone to use getTypeInfo here in the future.