mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #8090 from shajrawi/ConsumptionKind_UnconditionalCheckedCastValue
Add consumption kind to UnconditionalCheckedCastValueInst
This commit is contained in:
@@ -2046,7 +2046,7 @@ SILInstruction *CastOptimizer::simplifyCheckedCastValueBranchInst(
|
||||
|
||||
if (!CastedValue)
|
||||
CastedValue = Builder.createUnconditionalCheckedCastValue(
|
||||
Loc, Op, LoweredTargetType);
|
||||
Loc, CastConsumptionKind::TakeAlways, Op, LoweredTargetType);
|
||||
} else {
|
||||
CastedValue = SILUndef::get(LoweredTargetType, Mod);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user