File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -7580,10 +7580,16 @@ class BranchInst final
7580
7580
unsigned getNumArgs () const { return getAllOperands ().size (); }
7581
7581
SILValue getArg (unsigned i) const { return getAllOperands ()[i].get (); }
7582
7582
7583
+ // / Return the SILPhiArgument for the given operand.
7584
+ const SILPhiArgument *getArgForOperand (const Operand *oper) const {
7585
+ auto *self = const_cast <BranchInst *>(this );
7586
+ return self->getArgForOperand (oper);
7587
+ }
7588
+
7583
7589
// / Return the SILPhiArgument for the given operand.
7584
7590
// /
7585
7591
// / See SILArgument.cpp.
7586
- const SILPhiArgument *getArgForOperand (const Operand *oper) const ;
7592
+ SILPhiArgument *getArgForOperand (const Operand *oper);
7587
7593
};
7588
7594
7589
7595
// / A conditional branch.
Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ TermInst *SILPhiArgument::getSingleTerminator() const {
300
300
return const_cast <SILBasicBlock *>(predBlock)->getTerminator ();
301
301
}
302
302
303
- const SILPhiArgument *BranchInst::getArgForOperand (const Operand *oper) const {
303
+ SILPhiArgument *BranchInst::getArgForOperand (const Operand *oper) {
304
304
assert (oper->getUser () == this );
305
305
return cast<SILPhiArgument>(
306
306
getDestBB ()->getArgument (oper->getOperandNumber ()));
You can’t perform that action at this time.
0 commit comments