Commit cf23b4a
committed
[region-isolation] Stub out PartitionOpEvaluator::doesFunctionHaveSendingResult() so that the unittests can override it.
The unittests for PartitionUtils pass in mocked operands and instructions that
cannot be dereferenced. Adding this static CRTP helper allows for the unittest
PartitionOpEvaluator subclass to just return false for it instead of
dereferencing operands or instructions. The rest of the evaluators just get to
use the default "normal" implementation that actually accesses program state.
(cherry picked from commit 1086264)1 parent 6649fac commit cf23b4a
File tree
2 files changed
+20
-8
lines changed- include/swift/SILOptimizer/Utils
- unittests/SILOptimizer
2 files changed
+20
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1087 | 1087 | | |
1088 | 1088 | | |
1089 | 1089 | | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
1090 | 1098 | | |
1091 | 1099 | | |
1092 | 1100 | | |
| |||
1130 | 1138 | | |
1131 | 1139 | | |
1132 | 1140 | | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
1136 | | - | |
| 1141 | + | |
1137 | 1142 | | |
1138 | 1143 | | |
1139 | 1144 | | |
| |||
1246 | 1251 | | |
1247 | 1252 | | |
1248 | 1253 | | |
1249 | | - | |
1250 | | - | |
1251 | | - | |
1252 | | - | |
| 1254 | + | |
1253 | 1255 | | |
1254 | 1256 | | |
1255 | 1257 | | |
| |||
1564 | 1566 | | |
1565 | 1567 | | |
1566 | 1568 | | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
1567 | 1575 | | |
1568 | 1576 | | |
1569 | 1577 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
0 commit comments