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:
@@ -2862,16 +2862,24 @@ class UnconditionalCheckedCastValueInst final
|
||||
ValueKind::UnconditionalCheckedCastValueInst,
|
||||
UnconditionalCheckedCastValueInst, ConversionInst, true> {
|
||||
friend SILBuilder;
|
||||
CastConsumptionKind ConsumptionKind;
|
||||
|
||||
UnconditionalCheckedCastValueInst(SILDebugLocation DebugLoc, SILValue Operand,
|
||||
UnconditionalCheckedCastValueInst(SILDebugLocation DebugLoc,
|
||||
CastConsumptionKind consumption,
|
||||
SILValue Operand,
|
||||
ArrayRef<SILValue> TypeDependentOperands,
|
||||
SILType DestTy)
|
||||
: UnaryInstructionWithTypeDependentOperandsBase(
|
||||
DebugLoc, Operand, TypeDependentOperands, DestTy) {}
|
||||
DebugLoc, Operand, TypeDependentOperands, DestTy),
|
||||
ConsumptionKind(consumption) {}
|
||||
|
||||
static UnconditionalCheckedCastValueInst *
|
||||
create(SILDebugLocation DebugLoc, SILValue Operand, SILType DestTy,
|
||||
SILFunction &F, SILOpenedArchetypesState &OpenedArchetypes);
|
||||
create(SILDebugLocation DebugLoc, CastConsumptionKind consumption,
|
||||
SILValue Operand, SILType DestTy, SILFunction &F,
|
||||
SILOpenedArchetypesState &OpenedArchetypes);
|
||||
|
||||
public:
|
||||
CastConsumptionKind getConsumptionKind() const { return ConsumptionKind; }
|
||||
};
|
||||
|
||||
/// StructInst - Represents a constructed loadable struct.
|
||||
|
||||
Reference in New Issue
Block a user