[PATCH] D32634: Emulate TrackingVH using WeakVH

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 1 00:46:41 PDT 2017


chandlerc accepted this revision.
chandlerc added a comment.
This revision is now accepted and ready to land.

LGTM, this looks like a nice simplification and frees up the useful bit to support non-tracking VHs. Tiny nit below, but feel free to submit this and the non-tracking weak stuff when you're ready.



================
Comment at: include/llvm/IR/ValueHandle.h:314
   void setValPtr(ValueTy *P) {
-    CheckValidity();
-    ValueHandleBase::operator=(GetAsValue(P));
+    // Assigning to non-valid TrackingVH 's are fine so we just unconditionally
+    // assign here.
----------------
stray space before the `'`.


https://reviews.llvm.org/D32634





More information about the llvm-commits mailing list