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.
The motivation is to make it easy to get to the datalayout of the
module unambiguously. That is required to verify that inttoptr and
ptrtoint constant expressions are well typed in the face of
non-integral pointer types.
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.