@@ -1092,8 +1092,7 @@ checkStorageDominates(AllocStackInst *allocInst,
1092
1092
1093
1093
void OpaqueStorageAllocation::allocatePhi (PhiValue phi) {
1094
1094
// Coalesces phi operand storage with the phi storage. The algorithm processes
1095
- // all incoming values at once, so it is is run when visiting the block
1096
- // argument.
1095
+ // all incoming values at once, so it is run when visiting the block argument.
1097
1096
//
1098
1097
// The phi operand projections are computed first to give them priority. Then
1099
1098
// we determine if the phi itself can share storage with one of its users.
@@ -1143,17 +1142,12 @@ createStackAllocation(SILValue value) {
1143
1142
assert (value.getOwnershipKind () != OwnershipKind::Guaranteed &&
1144
1143
" creating storage for a guaranteed value implies a copy" );
1145
1144
1146
- #ifndef NDEBUG
1147
1145
// Instructions that produce an opened type never reach here because they
1148
1146
// have guaranteed ownership--they project their storage. We reach this
1149
1147
// point after the opened value has been copied.
1150
- if (auto *defInst = value->getDefiningInstruction ()) {
1151
- if (auto *singleValue = dyn_cast<SingleValueInstruction>(defInst)) {
1152
- assert (!cast<SingleValueInstruction>(defInst)->getDefinedOpenedArchetype ()
1153
- && " owned open_existential is unsupported" );
1154
- }
1155
- }
1156
- #endif
1148
+ assert ((!isa<SingleValueInstruction>(value)
1149
+ || !cast<SingleValueInstruction>(value)->getDefinedOpenedArchetype ())
1150
+ && " owned open_existential is unsupported" );
1157
1151
1158
1152
SILType allocTy = value->getType ();
1159
1153
0 commit comments