Commit Graph

2 Commits

Author SHA1 Message Date
John Hui
bafcb9dcca [cxx-interop] Do not get private discriminator for private Clang types (#80485)
When generating debug symbols for private Clang types (which we started
importing recently), the compiler crashes due to an assertion failure
from ClangModuleUnit::getDiscriminatorForPrivateDecl(), which is called
by getFilePrivateScope().

This patch fixes the issue crash by not calling getFilePrivateScope()
for Clang types. A discriminator is usually needed to disambiguate
private Swift types declared in different files, but Clang types follow
different scoping conventions that make this discriminator unnecessary.

rdar://148481025
(cherry picked from commit dd2f465025)
2025-04-10 06:54:58 -07:00
John Hui
bbe10ec53f [cxx-interop] Add test case that checks irgen for imported private members (#80515)
(cherry picked from commit ce680eae55)
2025-04-10 06:54:58 -07:00