Commit 23747bb
committed
SILGen: Coordinate access strategy determination with actual codegen in
Looking at the AST-level `getReadImpl` doesn't always correspond to what
accessor SILGen prefers to use, due to resilience, ABI rules, and other
concerns. In findStorageReferenceExprForMoveOnly, when determining whether
a storage reference is borrowable, use the same logic as SILGenLValue actually
uses to determine what storage or accessor access strategy to use.
Fixes rdar://142509673findStorageReferenceExprForMoveOnly.1 parent b291cf4 commit 23747bb
File tree
2 files changed
+63
-3
lines changed- lib/SILGen
- test/SILOptimizer
2 files changed
+63
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3304 | 3304 | | |
3305 | 3305 | | |
3306 | 3306 | | |
| 3307 | + | |
3307 | 3308 | | |
3308 | 3309 | | |
3309 | 3310 | | |
3310 | 3311 | | |
| 3312 | + | |
3311 | 3313 | | |
3312 | 3314 | | |
3313 | 3315 | | |
| 3316 | + | |
3314 | 3317 | | |
3315 | 3318 | | |
3316 | 3319 | | |
| 3320 | + | |
3317 | 3321 | | |
3318 | 3322 | | |
3319 | 3323 | | |
3320 | 3324 | | |
3321 | | - | |
3322 | | - | |
3323 | | - | |
| 3325 | + | |
| 3326 | + | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
| 3361 | + | |
3324 | 3362 | | |
3325 | 3363 | | |
3326 | 3364 | | |
| |||
| 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 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments