]> granicus.if.org Git - clang/commit
Perform zero-initialization of virtual base classes when emitting
authorJohn McCall <rjmccall@apple.com>
Tue, 15 Feb 2011 06:40:56 +0000 (06:40 +0000)
committerJohn McCall <rjmccall@apple.com>
Tue, 15 Feb 2011 06:40:56 +0000 (06:40 +0000)
commit9b7da1c46d6d2849f9cb51328d7fcddf2c417672
tree586f035ba023d43ad7c063ca7c2ac642e9bef469
parentfe59b7472c06b36efb74fbb50bbdf464fa30c0d8
Perform zero-initialization of virtual base classes when emitting
a zero constant for a complete class.  rdar://problem/8424975

To make this happen, track the field indexes for virtual bases
in the complete object.  I'm curious whether we might be better
off making CGRecordLayoutBuilder *much* more reliant on
ASTRecordLayout;  we're currently duplicating an awful lot of the ABI
layout logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125555 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExprConstant.cpp
lib/CodeGen/CGRecordLayout.h
lib/CodeGen/CGRecordLayoutBuilder.cpp
test/CodeGenCXX/pointers-to-data-members.cpp