]> granicus.if.org Git - clang/commit
Cast vtable address points to i32 (...)** to enable more globalopt
authorReid Kleckner <reid@kleckner.net>
Wed, 3 Dec 2014 21:00:21 +0000 (21:00 +0000)
committerReid Kleckner <reid@kleckner.net>
Wed, 3 Dec 2014 21:00:21 +0000 (21:00 +0000)
commit70d0d3c4beaec6dd2ae0c19a6a8b76e57ecb17fe
treecb42643b0cc581052ddd33d87a9dba1002e5c83c
parent8e531d43500b3de09341c140e48a8059f4acec7a
Cast vtable address points to i32 (...)** to enable more globalopt

We currently use i32 (...)** as the type of the vptr field in the LLVM
struct type. LLVM's GlobalOpt prefers any bitcasts to be on the side of
the data being stored rather than on the pointer being stored to.

Reviewers: majnemer

Differential Revision: http://reviews.llvm.org/D5916

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223267 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGClass.cpp
test/CodeGenCXX/constructor-init.cpp
test/CodeGenCXX/copy-constructor-synthesis-2.cpp
test/CodeGenCXX/copy-constructor-synthesis.cpp
test/CodeGenCXX/ctor-globalopt.cpp [new file with mode: 0644]
test/CodeGenCXX/microsoft-abi-multiple-nonvirtual-inheritance.cpp
test/CodeGenCXX/microsoft-abi-structors.cpp
test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp
test/CodeGenCXX/microsoft-interface.cpp
test/CodeGenCXX/skip-vtable-pointer-initialization.cpp
test/CodeGenCXX/vtable-pointer-initialization.cpp