[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
Thu Jan 14 13:44:22 PST 2016


rafael accepted this revision.
rafael added a reviewer: rafael.
rafael added a comment.
This revision is now accepted and ready to land.

LGTM with a nit.


================
Comment at: lib/IR/Verifier.cpp:499
@@ +498,3 @@
+    } else if (const Function *F = dyn_cast<Function>(V)) {
+      if (F->getParent() != GV.getParent())
+        CheckFailed("Global is used by function in a different module", &GV,
----------------
Nit: There are many calls to GV.getParent(). Don't you have the module being verified handy somewhere?


http://reviews.llvm.org/D15272





More information about the llvm-commits mailing list