This runs the verifier before exiting.
It uses the legacy pass manager because I could more easily figure out how to use it.
I don't really understand how the pass manager works, but I put this together by cribbing off of rustc.
Rust drives the function pass manager with its own c++ code, claiming that module functions can't be iterated with the C api. So I adapted Rust's LLVMRustRunFunctionPassManager. The C++ code lives inside a new crate, llvm-extra-sys.
I'd be glad to know if there's a way to run the verifier without writing some C++ code. But we'd probably end up with some C++ glue code eventually anyway.
The verified discovered that the return type emitted for the script.move test is wrong, so I disabled that test.