File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ class SILPhiArgument : public SILArgument {
291291 // /
292292 // / Returns false when called on a non-phi and when the visitor returns false.
293293 bool visitTransitiveIncomingPhiOperands (
294- function_ref<bool (SILPhiArgument *, Operand *)> visitor);
294+ function_ref<bool (SILPhiArgument *, Operand *)> visitor) const ;
295295
296296 // / Returns true if we were able to find a single terminator operand value for
297297 // / each predecessor of this arguments basic block. The found values are
Original file line number Diff line number Diff line change @@ -227,12 +227,12 @@ bool SILPhiArgument::getIncomingPhiValues(
227227}
228228
229229bool SILPhiArgument::visitTransitiveIncomingPhiOperands (
230- function_ref<bool (SILPhiArgument *, Operand *)> visitor) {
230+ function_ref<bool (SILPhiArgument *, Operand *)> visitor) const {
231231 if (!isPhi ())
232232 return false ;
233233
234234 GraphNodeWorklist<SILPhiArgument *, 4 > worklist;
235- worklist.initialize ( this );
235+ worklist.insert ( const_cast <SILPhiArgument *>( this ) );
236236
237237 while (auto *argument = worklist.pop ()) {
238238 SmallVector<Operand *> operands;
You can’t perform that action at this time.
0 commit comments