This patch invokes the Verifier on each module after loading, analogously to what regular LTO is doing. Besides diagnosing malformed bitcode, this allows it to strip out invalid debug info from bitcode produced by older, more buggy versions of LLVM. The new code is pretty much the same as in LTOCodeGenerator.cpp.
rdar://problem/31233625