When an externally-supplied record layout has a size that clearly
authorDouglas Gregor <dgregor@apple.com>
Fri, 26 Oct 2012 22:31:14 +0000 (22:31 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 26 Oct 2012 22:31:14 +0000 (22:31 +0000)
commit1423a5cfd74eec46580bb5e655e5967b732b8c0d
treef88edb8b7e4948ab1d8fe6cc065ef040d290a75b
parent9dd2e0872e045bc7fe3c664a81bb537569059623
When an externally-supplied record layout has a size that clearly
doesn't include padding up to the alignment of the record, take this
as a cue that the alignment of the record should (conservatively) be
set to 1. This is similar to other the other cues we use to determine
that the record has a lower alignment, e.g., that the
externally-supplied layout places fields at lower offsets than we
would. Fixes <rdar://problem/12582052>; test case in LLDB.

llvm-svn: 166824
clang/lib/AST/RecordLayoutBuilder.cpp
clang/test/CodeGenCXX/override-layout.cpp