Use the correct alignment for POD-member memcpys where the first field is a
authorLang Hames <lhames@gmail.com>
Wed, 27 Feb 2013 04:14:49 +0000 (04:14 +0000)
committerLang Hames <lhames@gmail.com>
Wed, 27 Feb 2013 04:14:49 +0000 (04:14 +0000)
commit1694e0d21df5fbab8576fe8c7bc4e7c25b838f5e
treebac19a0a5596bae65e7eac4faaee9006e93f752f
parent2ce6b43f40a4c21683338f88d943aeac798f8404
Use the correct alignment for POD-member memcpys where the first field is a
bitfield. CGBitField::StorageAlignment holds the alignment in chars, but
emitMemcpy had been treating it as if it were held in bits, leading to
underaligned memcpys.

Related to PR15348.

Thanks very much to Chandler for the diagnosis.

llvm-svn: 176163
clang/lib/CodeGen/CGClass.cpp
clang/test/CodeGenCXX/pod-member-memcpys.cpp