[PATCH] D23040: Tie the Verifier class to a Module; NFCI
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 1 16:52:35 PDT 2016
sanjoy created this revision.
sanjoy added reviewers: dexonsmith, bkramer, chandlerc.
sanjoy added a subscriber: llvm-commits.
Herald added a subscriber: mcrosier.
This commit changes the Verifier class to accept a Module via the
constructor to make it obvious that a specific instance of the class is
only intended to work with a specific module. The `updateModule` setter
(despite being private) was making this fact less transparent.
There are fields in the `Verifier` class like `DeoptimizeDeclarations`
and `GlobalValueVisited` which are module specific, so a given
Verifier instance will not in fact work across multiple modules today.
This change just makes that more obvious.
I'm also tempted to change the `Verifier::verify(const Module &M)`
function to `Verifier::verify()` (as a separate change perhaps?) if
people are on-board with that.
https://reviews.llvm.org/D23040
Files:
lib/IR/Verifier.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23040.66402.patch
Type: text/x-patch
Size: 5767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160801/76a7c8bb/attachment.bin>
More information about the llvm-commits
mailing list