42
42
#include " llvm/ADT/ilist.h"
43
43
#include " llvm/ADT/ilist_node.h"
44
44
#include " llvm/Support/TrailingObjects.h"
45
+ #include < array>
45
46
46
47
namespace swift {
47
48
@@ -7138,12 +7139,12 @@ class YieldInst final
7138
7139
YieldInst, TermInst> {
7139
7140
friend SILBuilder;
7140
7141
7141
- SILSuccessor DestBBs[ 2 ] ;
7142
+ std::array< SILSuccessor, 2 > DestBBs ;
7142
7143
7143
7144
YieldInst (SILDebugLocation loc, ArrayRef<SILValue> yieldedValues,
7144
7145
SILBasicBlock *normalBB, SILBasicBlock *unwindBB)
7145
7146
: InstructionBaseWithTrailingOperands(yieldedValues, loc),
7146
- DestBBs{{this , normalBB}, {this , unwindBB}} {}
7147
+ DestBBs{{{ this , normalBB}, {this , unwindBB} }} {}
7147
7148
7148
7149
static YieldInst *create (SILDebugLocation loc,
7149
7150
ArrayRef<SILValue> yieldedValues,
@@ -7253,7 +7254,8 @@ class CondBranchInst final
7253
7254
FalseIdx
7254
7255
};
7255
7256
private:
7256
- SILSuccessor DestBBs[2 ];
7257
+ std::array<SILSuccessor, 2 > DestBBs;
7258
+
7257
7259
// / The number of arguments for the True branch.
7258
7260
unsigned getNumTrueArgs () const {
7259
7261
return SILInstruction::Bits.CondBranchInst .NumTrueArgs ;
@@ -7638,7 +7640,7 @@ class DynamicMethodBranchInst
7638
7640
7639
7641
SILDeclRef Member;
7640
7642
7641
- SILSuccessor DestBBs[ 2 ] ;
7643
+ std::array< SILSuccessor, 2 > DestBBs ;
7642
7644
7643
7645
// / The operand.
7644
7646
FixedOperandList<1 > Operands;
@@ -7686,7 +7688,7 @@ class CheckedCastBranchInst final:
7686
7688
CanType DestFormalTy;
7687
7689
bool IsExact;
7688
7690
7689
- SILSuccessor DestBBs[ 2 ] ;
7691
+ std::array< SILSuccessor, 2 > DestBBs ;
7690
7692
7691
7693
CheckedCastBranchInst (SILDebugLocation DebugLoc, bool IsExact,
7692
7694
SILValue Operand,
@@ -7698,8 +7700,8 @@ class CheckedCastBranchInst final:
7698
7700
TypeDependentOperands),
7699
7701
DestLoweredTy (DestLoweredTy),
7700
7702
DestFormalTy(DestFormalTy),
7701
- IsExact(IsExact), DestBBs{{this , SuccessBB, Target1Count},
7702
- {this , FailureBB, Target2Count}} {}
7703
+ IsExact(IsExact), DestBBs{{{ this , SuccessBB, Target1Count},
7704
+ {this , FailureBB, Target2Count} }} {}
7703
7705
7704
7706
static CheckedCastBranchInst *
7705
7707
create (SILDebugLocation DebugLoc, bool IsExact, SILValue Operand,
@@ -7746,7 +7748,7 @@ class CheckedCastValueBranchInst final
7746
7748
SILType DestLoweredTy;
7747
7749
CanType DestFormalTy;
7748
7750
7749
- SILSuccessor DestBBs[ 2 ] ;
7751
+ std::array< SILSuccessor, 2 > DestBBs ;
7750
7752
7751
7753
CheckedCastValueBranchInst (SILDebugLocation DebugLoc,
7752
7754
SILValue Operand, CanType SourceFormalTy,
@@ -7757,7 +7759,7 @@ class CheckedCastValueBranchInst final
7757
7759
TypeDependentOperands),
7758
7760
SourceFormalTy (SourceFormalTy),
7759
7761
DestLoweredTy(DestLoweredTy), DestFormalTy(DestFormalTy),
7760
- DestBBs{{this , SuccessBB}, {this , FailureBB}} {}
7762
+ DestBBs{{{ this , SuccessBB}, {this , FailureBB} }} {}
7761
7763
7762
7764
static CheckedCastValueBranchInst *
7763
7765
create (SILDebugLocation DebugLoc,
@@ -7791,7 +7793,7 @@ class CheckedCastAddrBranchInst
7791
7793
CastConsumptionKind ConsumptionKind;
7792
7794
7793
7795
FixedOperandList<2 > Operands;
7794
- SILSuccessor DestBBs[ 2 ] ;
7796
+ std::array< SILSuccessor, 2 > DestBBs ;
7795
7797
7796
7798
CanType SourceType;
7797
7799
CanType TargetType;
@@ -7803,8 +7805,8 @@ class CheckedCastAddrBranchInst
7803
7805
ProfileCounter Target1Count,
7804
7806
ProfileCounter Target2Count)
7805
7807
: InstructionBase(DebugLoc), ConsumptionKind(consumptionKind),
7806
- Operands{this , src, dest}, DestBBs{{this , successBB, Target1Count},
7807
- {this , failureBB, Target2Count}},
7808
+ Operands{this , src, dest}, DestBBs{{{ this , successBB, Target1Count},
7809
+ {this , failureBB, Target2Count} }},
7808
7810
SourceType (srcType), TargetType(targetType) {
7809
7811
assert (ConsumptionKind != CastConsumptionKind::BorrowAlways &&
7810
7812
" BorrowAlways is not supported on addresses" );
@@ -7856,7 +7858,7 @@ class TryApplyInstBase : public TermInst {
7856
7858
ErrorIdx
7857
7859
};
7858
7860
private:
7859
- SILSuccessor DestBBs[ 2 ] ;
7861
+ std::array< SILSuccessor, 2 > DestBBs ;
7860
7862
7861
7863
protected:
7862
7864
TryApplyInstBase (SILInstructionKind valueKind, SILDebugLocation Loc,
0 commit comments