Skip to content

Commit ac9e714

Browse files
xedinkavon
authored andcommitted
[SIL] Unwrap MoveOnly wrapper type before checking Escapable conformance
(cherry picked from commit 840ef47)
1 parent 4518646 commit ac9e714

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/SIL/IR/SILType.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,9 @@ bool SILType::isEscapable(const SILFunction &function) const {
10701070
function.getModule().Types, 0);
10711071
}
10721072

1073+
if (auto *moveOnlyTy = ty->getAs<SILMoveOnlyWrappedType>())
1074+
ty = moveOnlyTy->getInnerType();
1075+
10731076
// TODO: Support ~Escapable in parameter packs.
10741077
//
10751078
// Treat all other SIL-specific types as Escapable.

0 commit comments

Comments
 (0)