mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Rewrite some isPlusOne calls to isPlusOneOrTrivial.
Whenever we want to forward to a +1 value but don't need to destroy the original memory, use isPlusOneOrTrivial. This follows the existing naming scheme. Fixes rdar://108001491 (SIL verification failed: Found mutating or consuming use of an in_guaranteed parameter?!: !ImmutableAddressUseVerifier().isMutatingOrConsuming(fArg))
This commit is contained in:
@@ -1679,7 +1679,7 @@ emitCastOperand(SILGenFunction &SGF, SILLocation loc,
|
||||
finalValue =
|
||||
SGF.emitSubstToOrigValue(loc, finalValue, abstraction, sourceType, ctx);
|
||||
}
|
||||
assert(finalValue.isPlusOne(SGF));
|
||||
assert(finalValue.isPlusOneOrTrivial(SGF));
|
||||
|
||||
// If we at this point do not require an address, return final value. We know
|
||||
// that it is a +1 take always value.
|
||||
|
||||
Reference in New Issue
Block a user