]> granicus.if.org Git - clang/commit
IRGen: When performing CFI checks, load vtable pointer from vbase when necessary.
authorPeter Collingbourne <peter@pcc.me.uk>
Wed, 13 Dec 2017 21:53:04 +0000 (21:53 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 13 Dec 2017 21:53:04 +0000 (21:53 +0000)
commit5f4b5f89ed260041f1492e754cf5447f4f4123ed
tree27fa3c557b0a5603dc8d464c2ebceae348fef632
parente8ca256e5e3f0705a447f60d297e97457fd28438
IRGen: When performing CFI checks, load vtable pointer from vbase when necessary.

Under the Microsoft ABI, it is possible for an object not to have
a virtual table pointer of its own if all of its virtual functions
were introduced by virtual bases. In that case, we need to load the
vtable pointer from one of the virtual bases and perform the type
check using its type.

Differential Revision: https://reviews.llvm.org/D41036

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320638 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGExprCXX.cpp
lib/CodeGen/ItaniumCXXABI.cpp
lib/CodeGen/MicrosoftCXXABI.cpp
test/CodeGenCXX/cfi-ms-vbase-derived-cast.cpp [new file with mode: 0644]
test/CodeGenCXX/cfi-ms-vbase-nvcall.cpp [new file with mode: 0644]