Commit eb71200
committed
SimplifyCFG: insert compensating destroy when replacing a
When replacing a `switch_enum` of an owned enum value with a branch to a non-payload case destination,
we need to insert a destroy of the enum value.
Fixes a SIL ownership verification failure.
swiftlang#84552
rdar://161482601switch_enum
1 parent f83752d commit eb71200
File tree
2 files changed
+23
-1
lines changed- lib/SILOptimizer/Transforms
- test/SILOptimizer
2 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1793 | 1793 | | |
1794 | 1794 | | |
1795 | 1795 | | |
1796 | | - | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
1797 | 1801 | | |
1798 | 1802 | | |
1799 | 1803 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1944 | 1944 | | |
1945 | 1945 | | |
1946 | 1946 | | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
1947 | 1965 | | |
1948 | 1966 | | |
1949 | 1967 | | |
| |||
0 commit comments