[PATCH] D41036: IRGen: When performing CFI checks, load vtable pointer from vbase when necessary.

Peter Collingbourne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 8 15:14:33 PST 2017


pcc created this revision.

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.


https://reviews.llvm.org/D41036

Files:
  clang/lib/CodeGen/CGCXXABI.h
  clang/lib/CodeGen/CGClass.cpp
  clang/lib/CodeGen/CGExprCXX.cpp
  clang/lib/CodeGen/ItaniumCXXABI.cpp
  clang/lib/CodeGen/MicrosoftCXXABI.cpp
  clang/test/CodeGenCXX/cfi-ms-vbase-derived-cast.cpp
  clang/test/CodeGenCXX/cfi-ms-vbase-nvcall.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41036.126220.patch
Type: text/x-patch
Size: 8919 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171208/5b0bd598/attachment-0001.bin>


More information about the cfe-commits mailing list