Commit Graph

2 Commits

Author SHA1 Message Date
John Hui
dd2f465025 [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
2025-04-09 22:32:12 -07:00
John Hui
ce680eae55 [cxx-interop] Add test case that checks irgen for imported private members (#80515) 2025-04-09 11:05:43 -07:00