[MS ABI] Account for the virtual inheritance quirk when mangling
Virtual inheritance member pointers are always relative to the vbindex, even when the member pointer doesn't point into a virtual base. This is corrected by adjusting the non-virtual offset backwards from the vbptr back to the top of the most derived class. While we performed this adjustment when manifesting member pointers as constants or when performing conversions, we didn't perform the adjustment when mangling them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240453 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/AST/ASTContext.h 11 additions, 0 deletionsinclude/clang/AST/ASTContext.h
- lib/AST/ASTContext.cpp 10 additions, 0 deletionslib/AST/ASTContext.cpp
- lib/AST/MicrosoftMangle.cpp 8 additions, 1 deletionlib/AST/MicrosoftMangle.cpp
- lib/CodeGen/MicrosoftCXXABI.cpp 6 additions, 28 deletionslib/CodeGen/MicrosoftCXXABI.cpp
- test/CodeGenCXX/mangle-ms-templates-memptrs.cpp 12 additions, 0 deletionstest/CodeGenCXX/mangle-ms-templates-memptrs.cpp
Loading
Please register or sign in to comment