When creating a global variable with a type of a struct with bitfields, we must forcibly set the alignment of the global from the RecordDecl. We must do this so that the proper bitfield alignment makes its way down to LLVM, since clang will mangle the bitfields into one large type.
This patch feels like a bit of a hack to me, but honestly I'm not sure how else to go about making this change. This patch is a first attempt to address the problem described in the thread http://lists.cs.uiuc.edu/pipermail/cfe-dev/2015-April/042521.html.
(There is no testcase attached to this just yet I shall add one tomorrow, I just wanted to get this out for review early to see whether I'm approaching this the right way).
redundant line?