]> granicus.if.org Git - clang/commit
CodeGen: Use 32-bit gep offsets to address vtable address points.
authorPeter Collingbourne <peter@pcc.me.uk>
Mon, 14 Mar 2016 19:07:10 +0000 (19:07 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Mon, 14 Mar 2016 19:07:10 +0000 (19:07 +0000)
commita237fa06fdfa4db7170f4858bd956583cde9b888
tree5a4006a7deea0aa457688c50c7a56ed843367065
parent6968928bfded15e0221a115052e3b47daa8aaf68
CodeGen: Use 32-bit gep offsets to address vtable address points.

The relative vtable ABI will use a struct rather than an array as the type
of a vtable. LLVM only allows 32-bit integers as struct indices, so we need
to use 32-bit integers to get addresses of address points. In order to keep
the code simple, we might as well do that unconditionally.

It's probably a reasonable implementation limit to support no more than 2
billion virtual functions per class.

This change causes quite a bit of churn in the test suite, so I'm making
it separately.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263469 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
lib/CodeGen/CGVTT.cpp
lib/CodeGen/ItaniumCXXABI.cpp
test/CodeGenCXX/const-init-cxx11.cpp
test/CodeGenCXX/constructor-init.cpp
test/CodeGenCXX/copy-constructor-synthesis-2.cpp
test/CodeGenCXX/copy-constructor-synthesis.cpp
test/CodeGenCXX/microsoft-interface.cpp
test/CodeGenCXX/skip-vtable-pointer-initialization.cpp
test/CodeGenCXX/strict-vtable-pointers.cpp
test/CodeGenCXX/vtable-assume-load.cpp
test/CodeGenCXX/vtable-pointer-initialization.cpp
test/CodeGenCXX/vtt-layout.cpp