Commit c45753d
committed
[cxx-interop][SwiftToCxx] Emit foreign reference types with
C++ foreign reference types are imported to Swift as classes, not structs. When generating a Clang header that represents a Swift struct holding a C++ FRT as a field, we need to print the FRT as a pointer.
This was previously hitting an assertion in debug builds of the compiler: `assert(CD->isObjC())`.
rdar://114711899* in the generated Clang header1 parent 4e05144 commit c45753d
File tree
5 files changed
+27
-2
lines changed- lib/PrintAsClang
- test/Interop/CxxToSwiftToObjcxx
- Inputs
5 files changed
+27
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2504 | 2504 | | |
2505 | 2505 | | |
2506 | 2506 | | |
2507 | | - | |
| 2507 | + | |
2508 | 2508 | | |
2509 | 2509 | | |
2510 | 2510 | | |
2511 | 2511 | | |
2512 | 2512 | | |
2513 | 2513 | | |
2514 | 2514 | | |
2515 | | - | |
| 2515 | + | |
| 2516 | + | |
2516 | 2517 | | |
2517 | 2518 | | |
2518 | 2519 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments