Skip to content

Commit dc867e4

Browse files
committed
Comment OSLogOptimization: add a FIXME to handle OSSA correctly
1 parent 2860ac1 commit dc867e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SILOptimizer/Mandatory/OSLogOptimization.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,10 @@ static void replaceAllUsesAndFixLifetimes(SILValue foldedVal,
950950
// destroy foldedVal at the end of the borrow scope.
951951
assert(originalVal.getOwnershipKind() == OwnershipKind::Guaranteed);
952952

953+
// FIXME: getUniqueBorrowScopeIntroducingValue may look though various storage
954+
// casts. There's no reason to think that it's valid to replace uses of
955+
// originalVal with a new borrow of the the "introducing value". All casts
956+
// potentially need to be cloned.
953957
Optional<BorrowedValue> originalScopeBegin =
954958
getUniqueBorrowScopeIntroducingValue(originalVal);
955959
assert(originalScopeBegin &&

0 commit comments

Comments
 (0)