rustc: Run the llvm verifier pass before optimization. Closes #376

The optimization passes were hiding some codegen errors so now we run the
verifier both before and after optimization.
This commit is contained in:
Brian Anderson 2011-05-23 19:49:23 -04:00
parent 8637c09cf9
commit 2505a2312e

View file

@ -115,6 +115,10 @@ mod write {
}
}
if (opts.verify) {
llvm::LLVMAddVerifierPass(pm.llpm);
}
// FIXME: This is mostly a copy of the bits of opt's -O2 that are
// available in the C api.
// FIXME2: We might want to add optimization levels like -O1, -O2,