Commit dd2f465
authored
[cxx-interop] Do not get private discriminator for private Clang types (swiftlang#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://1484810251 parent 8762f48 commit dd2f465
File tree
2 files changed
+7
-1
lines changed- lib/IRGen
- test/Interop/Cxx/class/access
2 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2577 | 2577 | | |
2578 | 2578 | | |
2579 | 2579 | | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
2580 | 2583 | | |
2581 | | - | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
2582 | 2587 | | |
2583 | 2588 | | |
2584 | 2589 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
0 commit comments