Introduce DIAlignment typedef, actually change alignment type from uint64_t to uint32_t to save space. In dependent patches we shall have alignment field added to DIVariable family and switching from uint64_t to uint32_t will save 4 bytes per variable.
I support this.
One question: What happens when we read bitcode that contains an alignment field with a value larger > 2^32?
Does the bitcode reader throw an error? Do we even care to support a non-breaking upgrade path for this?
We already do check this in frontend (Sema):
// Alignment calculations can wrap around if it's greater than 2**28. unsigned MaxValidAlignment = Context.getTargetInfo().getTriple().isOSBinFormatCOFF() ? 8192 : 268435456;
I have added check in BitcodeReader just in case.
After letting this sit for a few days, I think that using an unsigned (there doesn't seem to be much precedent for uint32_t) is the way to go. It's more readable than an opaque DIAlignment type (whose size isn't obvious from the name).