]> granicus.if.org Git - clang/commit
[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)
commit3a4bcdc687c7076c6a0a602786b2c72f6e2d243c
tree2a92963a08e26f5e049ee96a2b3b910696b38b53
parent8e6ba048114e318df1605a43d1f11a7de4a8ddb7
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280287 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGDebugInfo.cpp
test/CodeGenCXX/debug-info-ms-vbase.cpp [new file with mode: 0644]