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

Keno Fischer via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 6 17:31:39 PST 2015


loladiro created this revision.
loladiro added a reviewer: dexonsmith.
loladiro added a subscriber: llvm-commits.

We already have the inverse verification that we only use globals
that are defined in this module. This essentially catches the
same mistake, but when verifying the module that contains the
definition. There is a moderately annoying corner case caused by
our usage of a parentless ReturnInst to hold prefix/prologue data.
In order to perform correct diagnostics, we need to construct the
inverse map for this on demand. Since that can be expensive, this
inverse mapping is cached in the Verifier class and only constructed
when needed.

http://reviews.llvm.org/D15272

Files:
  lib/IR/Verifier.cpp
  unittests/IR/VerifierTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15272.42024.patch
Type: text/x-patch
Size: 4560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151207/739f33fb/attachment.bin>


More information about the llvm-commits mailing list