@@ -7983,12 +7983,20 @@ class PackElementGetInst final
7983
7983
SILType elementType);
7984
7984
7985
7985
public:
7986
- SILValue getIndex () const {
7987
- return getAllOperands ()[IndexOperand].get ();
7986
+ SILValue getIndex () const { return getIndexOperand ()->get (); }
7987
+
7988
+ Operand *getIndexOperand () { return &getAllOperands ()[IndexOperand]; }
7989
+
7990
+ const Operand *getIndexOperand () const {
7991
+ return &getAllOperands ()[IndexOperand];
7988
7992
}
7989
7993
7990
- SILValue getPack () const {
7991
- return getAllOperands ()[PackOperand].get ();
7994
+ SILValue getPack () const { return getPackOperand ()->get (); }
7995
+
7996
+ Operand *getPackOperand () { return &getAllOperands ()[PackOperand]; }
7997
+
7998
+ const Operand *getPackOperand () const {
7999
+ return &getAllOperands ()[PackOperand];
7992
8000
}
7993
8001
7994
8002
CanSILPackType getPackType () const {
@@ -8028,18 +8036,29 @@ class PackElementSetInst
8028
8036
ArrayRef<Operand> getAllOperands () const { return Operands.asArray (); }
8029
8037
MutableArrayRef<Operand> getAllOperands () { return Operands.asArray (); }
8030
8038
8031
- SILValue getValue () const {
8032
- return getAllOperands ()[ValueOperand].get ();
8039
+ SILValue getValue () const { return getValueOperand ()->get (); }
8040
+
8041
+ const Operand *getValueOperand () const {
8042
+ return &getAllOperands ()[ValueOperand];
8033
8043
}
8034
8044
8035
- SILValue getIndex () const {
8036
- return getAllOperands ()[IndexOperand].get ();
8045
+ Operand *getValueOperand () { return &getAllOperands ()[ValueOperand]; }
8046
+
8047
+ SILValue getIndex () const { return getIndexOperand ()->get (); }
8048
+
8049
+ const Operand *getIndexOperand () const {
8050
+ return &getAllOperands ()[IndexOperand];
8037
8051
}
8052
+ Operand *getIndexOperand () { return &getAllOperands ()[IndexOperand]; }
8053
+
8054
+ SILValue getPack () const { return getPackOperand ()->get (); }
8038
8055
8039
- SILValue getPack () const {
8040
- return getAllOperands ()[PackOperand]. get () ;
8056
+ const Operand * getPackOperand () const {
8057
+ return & getAllOperands ()[PackOperand];
8041
8058
}
8042
8059
8060
+ Operand *getPackOperand () { return &getAllOperands ()[PackOperand]; }
8061
+
8043
8062
CanSILPackType getPackType () const {
8044
8063
return getPack ()->getType ().castTo <SILPackType>();
8045
8064
}
@@ -8079,12 +8098,20 @@ class TuplePackElementAddrInst final
8079
8098
SILType elementType);
8080
8099
8081
8100
public:
8082
- SILValue getIndex () const {
8083
- return getAllOperands ()[IndexOperand].get ();
8101
+ SILValue getIndex () const { return getIndexOperand ()->get (); }
8102
+
8103
+ Operand *getIndexOperand () { return &getAllOperands ()[IndexOperand]; }
8104
+
8105
+ const Operand *getIndexOperand () const {
8106
+ return &getAllOperands ()[IndexOperand];
8084
8107
}
8085
8108
8086
- SILValue getTuple () const {
8087
- return getAllOperands ()[TupleOperand].get ();
8109
+ SILValue getTuple () const { return getTupleOperand ()->get (); }
8110
+
8111
+ Operand *getTupleOperand () { return &getAllOperands ()[TupleOperand]; }
8112
+
8113
+ const Operand *getTupleOperand () const {
8114
+ return &getAllOperands ()[TupleOperand];
8088
8115
}
8089
8116
8090
8117
CanTupleType getTupleType () const {
@@ -8124,9 +8151,21 @@ class TuplePackExtractInst final
8124
8151
ValueOwnershipKind forwardingOwnershipKind);
8125
8152
8126
8153
public:
8127
- SILValue getIndex () const { return getAllOperands ()[IndexOperand]. get (); }
8154
+ SILValue getIndex () const { return getIndexOperand ()-> get (); }
8128
8155
8129
- SILValue getTuple () const { return getAllOperands ()[TupleOperand].get (); }
8156
+ Operand *getIndexOperand () { return &getAllOperands ()[IndexOperand]; }
8157
+
8158
+ const Operand *getIndexOperand () const {
8159
+ return &getAllOperands ()[IndexOperand];
8160
+ }
8161
+
8162
+ SILValue getTuple () const { return getTupleOperand ()->get (); }
8163
+
8164
+ Operand *getTupleOperand () { return &getAllOperands ()[TupleOperand]; }
8165
+
8166
+ const Operand *getTupleOperand () const {
8167
+ return &getAllOperands ()[TupleOperand];
8168
+ }
8130
8169
8131
8170
CanTupleType getTupleType () const {
8132
8171
return getTuple ()->getType ().castTo <TupleType>();
0 commit comments