[MS ABI] Fix a crash in vptr path calculation
I discovered a case where the old algorithm would crash. Instead of trying to patch the algorithm, rewrite it. The new algorithm operates in three phases: 1. Find all paths to the subobject with the vptr. 2. Remove paths which are subsets of other paths. 3. Select the best path where 'best' is defined as introducing the most covariant overriders. If two paths introduce different overriders, raise a diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236444 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- lib/AST/VTableBuilder.cpp 151 additions, 111 deletionslib/AST/VTableBuilder.cpp
- test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp 29 additions, 0 deletionstest/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp
- test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp 1 addition, 1 deletion.../CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp
Loading
Please register or sign in to comment