[PATCH] D15762: [Statepoints] Refactor GCRelocateOperands into an intrinsic wrapper. NFC.

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 24 15:58:15 PST 2015


sanjoy added a comment.

Some minor comments inline.


================
Comment at: include/llvm/IR/Statepoint.h:386
@@ -391,3 +385,3 @@
   for (const User *U : getInstruction()->users())
-    if (isGCRelocate(U))
-      Result.push_back(GCRelocateOperands(U));
+    if (auto Relocate = dyn_cast<GCRelocate>(U))
+      Result.push_back(Relocate);
----------------
LLVM convention is `auto *` to make it obvious that `Relocate` is a pointer.

================
Comment at: include/llvm/IR/Statepoint.h:404
@@ -409,3 +403,3 @@
     for (const User *U : LandingPadUser->users())
-      if (isGCRelocate(U))
-        Result.push_back(GCRelocateOperands(U));
+      if (auto Relocate = dyn_cast<GCRelocate>(U))
+        Result.push_back(Relocate);
----------------
Same here -- `auto *Relocate` is preferable.


http://reviews.llvm.org/D15762





More information about the llvm-commits mailing list