Files
swift-mirror/lib/ClangImporter/SwiftDeclSynthesizer.cpp
Doug Gregor 34e47290f1 [C++ interop] Fix manual mangling of C++ base method thunks
When creating a C++ method that thunks from a particular C++ derived
class to call a method on one of its base classes, we do some manual
name mangling. This name mangling did not properly capture all of the
aspects of the thunk, so it was prone to collisions.

In moving to SIL asmname, we got a different set of collisions from
the ones that existed previously. Expanding the mangling to account
for small differences (const or not) as well as the base class type
eliminates these collisions. Most of the test changes account for the
new mangling, but the member-inheritance test indicates that this
change fixes an existing miscompile as well.
2025-10-29 19:35:57 -07:00

124 KiB