Skip to content

Commit eff6b66

Browse files
committed
Add hasOwnership assertion in SILBuilder while creating unchecked_value_cast
1 parent 7cea31b commit eff6b66

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/swift/SIL/SILBuilder.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,7 @@ class SILBuilder {
11251125

11261126
UncheckedValueCastInst *createUncheckedValueCast(SILLocation Loc, SILValue Op,
11271127
SILType Ty) {
1128+
assert(hasOwnership());
11281129
return insert(UncheckedValueCastInst::create(
11291130
getSILDebugLocation(Loc), Op, Ty, getFunction(), C.OpenedArchetypes));
11301131
}

0 commit comments

Comments
 (0)