mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Comment OSLogOptimization: add a FIXME to handle OSSA correctly
This commit is contained in:
@@ -950,6 +950,10 @@ static void replaceAllUsesAndFixLifetimes(SILValue foldedVal,
|
||||
// destroy foldedVal at the end of the borrow scope.
|
||||
assert(originalVal.getOwnershipKind() == OwnershipKind::Guaranteed);
|
||||
|
||||
// FIXME: getUniqueBorrowScopeIntroducingValue may look though various storage
|
||||
// casts. There's no reason to think that it's valid to replace uses of
|
||||
// originalVal with a new borrow of the the "introducing value". All casts
|
||||
// potentially need to be cloned.
|
||||
Optional<BorrowedValue> originalScopeBegin =
|
||||
getUniqueBorrowScopeIntroducingValue(originalVal);
|
||||
assert(originalScopeBegin &&
|
||||
|
||||
Reference in New Issue
Block a user