Commit f31618d
[swift] Fix translation of move_phi
Summary: When we translate phi nodes, in llair this is a move_phi, and, whilst in normal move, we do not deref variables, here it's necessary. It was needed in an example for optional types. Now we see another example, when adding deref is a problem, because the translation adds it again later leading to a typechecking error. Now we keep track of that the deref has been already added in the move, and we don't add it later. With this approach both examples work correctly.
Reviewed By: davidpichardie
Differential Revision:
D89551549
Privacy Context Container: L1208441
fbshipit-source-id: 7e0c80ef28f6d58c075467b28d89bbf99455fa5f1 parent befc86c commit f31618d
File tree
4 files changed
+47
-14
lines changed- infer
- src/llvm
- tests/codetoanalyze/swift/frontend
4 files changed
+47
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
264 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
265 | 271 | | |
266 | 272 | | |
267 | 273 | | |
| |||
662 | 668 | | |
663 | 669 | | |
664 | 670 | | |
665 | | - | |
| 671 | + | |
666 | 672 | | |
667 | 673 | | |
668 | 674 | | |
669 | 675 | | |
670 | 676 | | |
671 | 677 | | |
672 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
673 | 691 | | |
674 | 692 | | |
675 | | - | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
676 | 696 | | |
677 | 697 | | |
678 | 698 | | |
| |||
816 | 836 | | |
817 | 837 | | |
818 | 838 | | |
819 | | - | |
| 839 | + | |
820 | 840 | | |
821 | | - | |
| 841 | + | |
822 | 842 | | |
823 | 843 | | |
824 | 844 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
101 | 107 | | |
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
107 | 113 | | |
108 | | - | |
| 114 | + | |
109 | 115 | | |
110 | 116 | | |
111 | 117 | | |
| |||
159 | 165 | | |
160 | 166 | | |
161 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
162 | 173 | | |
163 | 174 | | |
164 | 175 | | |
| |||
188 | 199 | | |
189 | 200 | | |
190 | 201 | | |
191 | | - | |
| 202 | + | |
192 | 203 | | |
193 | 204 | | |
194 | 205 | | |
| |||
201 | 212 | | |
202 | 213 | | |
203 | 214 | | |
204 | | - | |
205 | | - | |
| 215 | + | |
| 216 | + | |
206 | 217 | | |
207 | 218 | | |
208 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
91 | | - | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| |||
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
114 | | - | |
| 116 | + | |
| 117 | + | |
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
497 | | - | |
| 496 | + | |
498 | 497 | | |
499 | 498 | | |
500 | 499 | | |
| |||
0 commit comments