]> granicus.if.org Git - clang/commit
[MS-ABI] Fix alias-avoidance padding between bases
authorWarren Hunt <whunt@google.com>
Fri, 6 Dec 2013 19:54:25 +0000 (19:54 +0000)
committerWarren Hunt <whunt@google.com>
Fri, 6 Dec 2013 19:54:25 +0000 (19:54 +0000)
commit14bff0de022021931d9978d0c9d326b85f81b515
tree408d82d7e44b1889f9b144888496a0e80b0b6b15
parentc1e43c353bba10273f10a53c13f58fdf17d969e0
[MS-ABI] Fix alias-avoidance padding between bases

Adds padding between bases or virtual bases in an attempt to avoid
aliasing of zero-sized sub-objects.  The approach used by the ABI adds
two more bits of state.  Detailed comments are in the code.  Test cases
included.

Differential Revision: http://llvm-reviews.chandlerc.com/D2258

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196602 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/RecordLayout.h
lib/AST/RecordLayout.cpp
lib/AST/RecordLayoutBuilder.cpp
test/Layout/ms-x86-alias-avoidance-padding.cpp [new file with mode: 0644]