[codeview] Don't emit vshape info for classes without vfptrs
authorReid Kleckner <rnk@google.com>
Wed, 31 Aug 2016 20:35:01 +0000 (20:35 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 31 Aug 2016 20:35:01 +0000 (20:35 +0000)
commit598124296b617809244128602e616024577027ef
tree5c3db09b0630e6e241577805f4d69daa13fe5825
parent7c4700525c6d3f0e76c17081439ac30d53fe1251
[codeview] Don't emit vshape info for classes without vfptrs

Classes with no virtual methods or whose virtual methods were all
inherited from virtual bases don't have a vfptr at offset zero. We were
crashing attempting to get the layout of that non-existent vftable.

We don't need any vshape info in this case because the debugger can
infer it from the base class information. The current class may not
introduce any virtual methods if we are in this situation.

llvm-svn: 280287
clang/lib/CodeGen/CGDebugInfo.cpp
clang/test/CodeGenCXX/debug-info-ms-vbase.cpp [new file with mode: 0644]