[PATCH] D15272: [Verifier] Verifier that a GlobalValue is only used in this Module

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 23 06:34:37 PST 2015


rafael added a subscriber: rafael.

================
Comment at: lib/IR/Verifier.cpp:451
@@ -450,1 +450,3 @@
 
+template <typename CB1, typename CB2>
+static void
----------------
Why do you need a template? Looks like the callbacks always have the name type, no?

================
Comment at: lib/IR/Verifier.cpp:453
@@ +452,3 @@
+static void
+ForEachInstructionAndFunctionUser(const Use &TheUse,
+                                  SmallPtrSet<const Value *, 32> &Visited,
----------------
Start function names with a lowercase letter.

================
Comment at: lib/IR/Verifier.cpp:456
@@ +455,3 @@
+                                  CB1 &&callback1, CB2 &&callback2) {
+  if (!Visited.insert(TheUse.getUser()).second)
+    return;
----------------
Factor TheUse.getUser() to a variable.


http://reviews.llvm.org/D15272





More information about the llvm-commits mailing list