[llvm-commits] [patch] Please review PR5160

Nick Lewycky nicholas at mxc.ca
Sun Oct 11 12:02:05 PDT 2009


Jeffrey Yasskin wrote:
> I have a fix for a couple issues with CallbackVHs that change other
> ValueHandles referring to the same Value at
> http://llvm.org/bugs/attachment.cgi?id=3641 (http://llvm.org/PR5160).
> Could someone take a look before I commit it?

+  // We use a local ValueHandleBase as an iterator so that
+  // ValueHandles can add and remove themselves from the list without
+  // breaking our iteration.  This is not really an AssertingVH; we
+  // just have to give ValueHandleBase some kind.
+  for (ValueHandleBase Iterator(Assert, *Entry); Entry; Entry = 
Iterator.Next) {

Entries in the HandleBaseKind enum are free. Please create a new entry 
(maybe "LastHandleBaseKind") so that we can some day debug problems 
where this iterator VH shows up where it wasn't expected.

Besides that, it looks good. Thanks for tackling this!

Nick



More information about the llvm-commits mailing list