[PATCH] MS ABI: Consider alignment attributes on typedefs for layout
David Majnemer
david.majnemer at gmail.com
Tue Jul 29 15:45:31 PDT 2014
Hi rnk,
The MS ABI has a notion of 'required alignment' for fields; this
alignment supercedes pragma pack directives.
MSVC takes into account alignment attributes on typedefs when
determining whether or not a field has a certain required alignment.
Do the same in clang by tracking whether or not we saw such an attribute
when calculating the type's bitwidth and alignment.
This fixes PR20418.
http://reviews.llvm.org/D4714
Files:
include/clang/AST/ASTContext.h
lib/AST/ASTContext.cpp
lib/AST/RecordLayoutBuilder.cpp
lib/CodeGen/CGAtomic.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/Sema/SemaDeclObjC.cpp
test/Layout/ms-x86-pack-and-align.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4714.11999.patch
Type: text/x-patch
Size: 16811 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140729/2f881fe8/attachment.bin>
More information about the cfe-commits
mailing list