]> granicus.if.org Git - clang/commit
Fixed Assert In CGRecordLowering
authorWarren Hunt <whunt@google.com>
Fri, 25 Apr 2014 21:56:30 +0000 (21:56 +0000)
committerWarren Hunt <whunt@google.com>
Fri, 25 Apr 2014 21:56:30 +0000 (21:56 +0000)
commit34e86037931c687336f9ad0583020d865d6150d1
tree190978437297a5b9d4f882ed15d22fd88e47c9c1
parenta7b80b7a8fecae3d9d0d2691e83617400abf5919
Fixed Assert In CGRecordLowering
Prior to this patch, CGRecordLower assumed that virtual bases could not
be placed before the nvsize of an object.  This isn't true in Itanium
mode, virtual bases are placed at dsize rather than vnsize and in the
case of zero sized non-virtual bases nvsize can be larger than dsize.
This patch fixes CGRecordLowering to avoid an assert and to clip
bitfields properly in this case.  A test case is included.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207280 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGRecordLayoutBuilder.cpp
test/CodeGenCXX/class-layout.cpp