Skip to content

Commit 6734d4a

Browse files
committed
Disable GenericSpecializer for @guaranteed results
1 parent d9a2ff4 commit 6734d4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/SILOptimizer/Transforms/GenericSpecializer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ bool swift::specializeAppliesInFunction(SILFunction &F,
112112
// temporary stack location and returns a projection from the
113113
// store_borrow. This does not work for borrow accessors that return the
114114
// projection from within the store_borrow scope.
115-
if (F.hasOwnership() && Callee->getConventions().hasAddressResult()) {
115+
if (F.hasOwnership() &&
116+
(Callee->getConventions().hasAddressResult() ||
117+
Callee->getConventions().hasGuaranteedResult())) {
116118
continue;
117119
}
118120

0 commit comments

Comments
 (0)