Merge pull request #8090 from shajrawi/ConsumptionKind_UnconditionalCheckedCastValue

Add consumption kind to UnconditionalCheckedCastValueInst
This commit is contained in:
Joe Shajrawi
2017-03-14 15:30:26 -07:00
committed by GitHub
17 changed files with 80 additions and 36 deletions

View File

@@ -1775,7 +1775,8 @@ UnconditionalCheckedCastInst *UnconditionalCheckedCastInst::create(
}
UnconditionalCheckedCastValueInst *UnconditionalCheckedCastValueInst::create(
SILDebugLocation DebugLoc, SILValue Operand, SILType DestTy, SILFunction &F,
SILDebugLocation DebugLoc, CastConsumptionKind consumption,
SILValue Operand, SILType DestTy, SILFunction &F,
SILOpenedArchetypesState &OpenedArchetypes) {
SILModule &Mod = F.getModule();
SmallVector<SILValue, 8> TypeDependentOperands;
@@ -1786,7 +1787,7 @@ UnconditionalCheckedCastValueInst *UnconditionalCheckedCastValueInst::create(
void *Buffer =
Mod.allocateInst(size, alignof(UnconditionalCheckedCastValueInst));
return ::new (Buffer) UnconditionalCheckedCastValueInst(
DebugLoc, Operand, TypeDependentOperands, DestTy);
DebugLoc, consumption, Operand, TypeDependentOperands, DestTy);
}
CheckedCastBranchInst *CheckedCastBranchInst::create(