]> granicus.if.org Git - clang/commit
Use ASTContext::getDeclAlign(<Field Decl>) to get the alignment of the first
authorLang Hames <lhames@gmail.com>
Tue, 5 Mar 2013 20:27:24 +0000 (20:27 +0000)
committerLang Hames <lhames@gmail.com>
Tue, 5 Mar 2013 20:27:24 +0000 (20:27 +0000)
commit23742cd8c6416c6c777904fb837b2021361c4f38
treef6cbf2289f9aeca73ae75709313bec76cbfed563
parent44f65a587ee39c20e715c9df411c864d328c71b5
Use ASTContext::getDeclAlign(<Field Decl>) to get the alignment of the first
field to be memcpy'd, rather instead of ASTContext::getTypeAlign(<Field Type>).
For packed structs the alignment of a field may be less than the alignment of
the field's type.

<rdar://problem/13338585>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176512 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGClass.cpp
test/CodeGenCXX/pod-member-memcpys.cpp