[codeview] Pass through vftable shape information
authorReid Kleckner <rnk@google.com>
Wed, 31 Aug 2016 16:11:43 +0000 (16:11 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 31 Aug 2016 16:11:43 +0000 (16:11 +0000)
commitdc124996d2a84a07cbfe0e8902fd5e6b2b4e18f0
tree68d391e96ede54ab3af8976b52bbbba1ba1fd7f9
parent9dac47319d29430e6fc6e04d2839e0f2c45dffac
[codeview] Pass through vftable shape information

The shape is really just the number of methods in the vftable, since we
don't support 16 bit far calls. All calls are near. Encode this number
in the size of the artificial __vtbl_ptr_type DIDerivedType that we
generate. For DWARF, this will be a normal pointer, but for codeview
this will be a wide pointer that gets pattern matched into a
VFTableShape record. Insert this type into the element list of all
dynamic classes when emitting CodeView, so that the backend can emit the
shape even if the vptr lives in a primary base class.

Fixes PR28150

llvm-svn: 280255
clang/lib/CodeGen/CGDebugInfo.cpp
clang/lib/CodeGen/CGDebugInfo.h
clang/test/CodeGenCXX/debug-info-ms-abi.cpp