]> granicus.if.org Git - clang/commit
[ms-cxxabi] Improve vbtable name mangling accuracy
authorReid Kleckner <reid@kleckner.net>
Fri, 3 Jan 2014 23:42:00 +0000 (23:42 +0000)
committerReid Kleckner <reid@kleckner.net>
Fri, 3 Jan 2014 23:42:00 +0000 (23:42 +0000)
commit1f67ffd58465790e222c70dca3833262e4769142
tree33dcf48ab7f20155b10753707a005a22e3c0d46d
parentd22d777d6d1383ebc61e5e6814607955cab41266
[ms-cxxabi] Improve vbtable name mangling accuracy

Summary:
This makes us more compatible with MSVC 2012+ and fixes PR17748 where we
would give two tables the same name.

Rather than doing a fresh depth-first traversal of the inheritance graph
for every record's vbtables, now we memoize vbtable paths for each
record.  By doing memoization, we end up considering virtual bases of
subobjects that come later in the depth-first traversal.  Where
previously we would have ignored a virtual base that we'd already seen,
we now consider it for name mangling purposes without emitting a
duplicate vbtable for it.

Reviewers: majnemer

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2509

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198462 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/VTableBuilder.h
lib/AST/VTableBuilder.cpp
lib/CodeGen/MicrosoftCXXABI.cpp
test/CodeGenCXX/microsoft-abi-vbtables.cpp