[RDF] Stop looking when reached code node in getNextRef with NextOnly
authorKrzysztof Parzyszek <kparzysz@quicinc.com>
Tue, 6 Jun 2023 19:14:49 +0000 (12:14 -0700)
committerKrzysztof Parzyszek <kparzysz@quicinc.com>
Mon, 12 Jun 2023 17:46:01 +0000 (10:46 -0700)
commit85f1726c1b7dc53f3a71c74601614fa4a0bfa8cd
treeb746c1881f48f05d8b6e323a552912e558031b0a
parent102c79fbf621b1e88dfc578766f827384d27c9ac
[RDF] Stop looking when reached code node in getNextRef with NextOnly

NextOnly tells getNextRef to only check the next node in the chain, and
stop iterating. The loop didn't stop though when the next link pointed
back to the beginning of the circular list.

Recommit this one right now, because it fixes a latent bug.
llvm/include/llvm/CodeGen/RDFGraph.h