@@ -2972,13 +2972,20 @@ class ConversionInst : public SILInstruction {
2972
2972
2973
2973
// / ConvertFunctionInst - Change the type of a function value without
2974
2974
// / affecting how it will codegen.
2975
- class ConvertFunctionInst
2976
- : public UnaryInstructionBase<ValueKind::ConvertFunctionInst, ConversionInst>
2977
- {
2975
+ class ConvertFunctionInst final
2976
+ : public UnaryInstructionWithTypeDependentOperandsBase<
2977
+ ValueKind::ConvertFunctionInst, ConvertFunctionInst, ConversionInst,
2978
+ /* HAS_RESULT */ true > {
2978
2979
friend SILBuilder;
2979
2980
2980
- ConvertFunctionInst (SILDebugLocation DebugLoc, SILValue Operand, SILType Ty)
2981
- : UnaryInstructionBase(DebugLoc, Operand, Ty) {}
2981
+ ConvertFunctionInst (SILDebugLocation DebugLoc, SILValue Operand,
2982
+ ArrayRef<SILValue> TypeDependentOperands, SILType Ty)
2983
+ : UnaryInstructionWithTypeDependentOperandsBase(
2984
+ DebugLoc, Operand, TypeDependentOperands, Ty) {}
2985
+
2986
+ static ConvertFunctionInst *
2987
+ create (SILDebugLocation DebugLoc, SILValue Operand, SILType Ty,
2988
+ SILFunction &F, SILOpenedArchetypesState &OpenedArchetypes);
2982
2989
};
2983
2990
2984
2991
// / ThinFunctionToPointerInst - Convert a thin function pointer to a
@@ -2996,25 +3003,39 @@ class ThinFunctionToPointerInst
2996
3003
2997
3004
// / PointerToThinFunctionInst - Convert a Builtin.RawPointer to a thin
2998
3005
// / function pointer.
2999
- class PointerToThinFunctionInst
3000
- : public UnaryInstructionBase<ValueKind::PointerToThinFunctionInst,
3001
- ConversionInst>
3002
- {
3006
+ class PointerToThinFunctionInst final
3007
+ : public UnaryInstructionWithTypeDependentOperandsBase<
3008
+ ValueKind::PointerToThinFunctionInst, PointerToThinFunctionInst,
3009
+ ConversionInst, /* HAS_RESULT */ true > {
3003
3010
friend SILBuilder;
3004
3011
3005
3012
PointerToThinFunctionInst (SILDebugLocation DebugLoc, SILValue operand,
3013
+ ArrayRef<SILValue> TypeDependentOperands,
3006
3014
SILType ty)
3007
- : UnaryInstructionBase(DebugLoc, operand, ty) {}
3015
+ : UnaryInstructionWithTypeDependentOperandsBase(
3016
+ DebugLoc, operand, TypeDependentOperands, ty) {}
3017
+
3018
+ static PointerToThinFunctionInst *
3019
+ create (SILDebugLocation DebugLoc, SILValue Operand, SILType Ty,
3020
+ SILFunction &F, SILOpenedArchetypesState &OpenedArchetypes);
3008
3021
};
3009
3022
3010
3023
// / UpcastInst - Perform a conversion of a class instance to a supertype.
3011
- class UpcastInst
3012
- : public UnaryInstructionBase<ValueKind::UpcastInst, ConversionInst>
3024
+ class UpcastInst final : public UnaryInstructionWithTypeDependentOperandsBase<
3025
+ ValueKind::UpcastInst, UpcastInst, ConversionInst,
3026
+ /* HAS_RESULT */ true >
3027
+
3013
3028
{
3014
3029
friend SILBuilder;
3015
3030
3016
- UpcastInst (SILDebugLocation DebugLoc, SILValue Operand, SILType Ty)
3017
- : UnaryInstructionBase(DebugLoc, Operand, Ty) {}
3031
+ UpcastInst (SILDebugLocation DebugLoc, SILValue Operand,
3032
+ ArrayRef<SILValue> TypeDependentOperands, SILType Ty)
3033
+ : UnaryInstructionWithTypeDependentOperandsBase(
3034
+ DebugLoc, Operand, TypeDependentOperands, Ty) {}
3035
+
3036
+ static UpcastInst *
3037
+ create (SILDebugLocation DebugLoc, SILValue Operand, SILType Ty,
3038
+ SILFunction &F, SILOpenedArchetypesState &OpenedArchetypes);
3018
3039
};
3019
3040
3020
3041
// / AddressToPointerInst - Convert a SIL address to a Builtin.RawPointer value.
@@ -3294,15 +3315,20 @@ class UnmanagedToRefInst
3294
3315
3295
3316
// / ThinToThickFunctionInst - Given a thin function reference, adds a null
3296
3317
// / context to convert the value to a thick function type.
3297
- class ThinToThickFunctionInst
3298
- : public UnaryInstructionBase<ValueKind::ThinToThickFunctionInst,
3299
- ConversionInst>
3300
- {
3318
+ class ThinToThickFunctionInst final
3319
+ : public UnaryInstructionWithTypeDependentOperandsBase<
3320
+ ValueKind::ThinToThickFunctionInst, ThinToThickFunctionInst,
3321
+ ConversionInst, /* HAS_RESULT */ true > {
3301
3322
friend SILBuilder;
3302
3323
3303
3324
ThinToThickFunctionInst (SILDebugLocation DebugLoc, SILValue Operand,
3304
- SILType Ty)
3305
- : UnaryInstructionBase(DebugLoc, Operand, Ty) {}
3325
+ ArrayRef<SILValue> TypeDependentOperands, SILType Ty)
3326
+ : UnaryInstructionWithTypeDependentOperandsBase(
3327
+ DebugLoc, Operand, TypeDependentOperands, Ty) {}
3328
+
3329
+ static ThinToThickFunctionInst *
3330
+ create (SILDebugLocation DebugLoc, SILValue Operand, SILType Ty,
3331
+ SILFunction &F, SILOpenedArchetypesState &OpenedArchetypes);
3306
3332
3307
3333
public:
3308
3334
// / Return the callee of the thin_to_thick_function.
0 commit comments