Commit fa22946
Gabor Horvath
[cxx-interop] Do not create copies of optionals of nullable pointers
In reverse interop, we create copies of values that will be consumed by
the Swift function. This is not necessary for pointers that are passed
as swift::Optional to Swift. These are layout compatible, and consuming
a pointer should not require us to do anything extra, hopefully ARC
would take care of all the details.
rdar://1468552331 parent 1bd0cd7 commit fa22946
File tree
2 files changed
+25
-3
lines changed- lib/PrintAsClang
- test/Interop/SwiftToObjCxx
2 files changed
+25
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1322 | 1322 | | |
1323 | 1323 | | |
1324 | 1324 | | |
1325 | | - | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
1326 | 1328 | | |
1327 | 1329 | | |
1328 | 1330 | | |
| |||
1394 | 1396 | | |
1395 | 1397 | | |
1396 | 1398 | | |
1397 | | - | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
1398 | 1402 | | |
1399 | 1403 | | |
1400 | 1404 | | |
| |||
1756 | 1760 | | |
1757 | 1761 | | |
1758 | 1762 | | |
1759 | | - | |
| 1763 | + | |
| 1764 | + | |
1760 | 1765 | | |
1761 | 1766 | | |
1762 | 1767 | | |
1763 | 1768 | | |
| 1769 | + | |
1764 | 1770 | | |
1765 | 1771 | | |
1766 | 1772 | | |
| |||
Lines changed: 16 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 | + | |
| 16 | + | |
0 commit comments