When doing "opt -O2" verify the bitcode like is done for

"opt -std-compile-opts".

llvm-svn: 146036
This commit is contained in:
Duncan Sands 2011-12-07 17:14:20 +00:00
parent 4d2b32ba51
commit 0f19e91a79
1 changed files with 2 additions and 0 deletions

View File

@ -407,6 +407,8 @@ static inline void addPass(PassManagerBase &PM, Pass *P) {
/// OptLevel - Optimization Level
static void AddOptimizationPasses(PassManagerBase &MPM,FunctionPassManager &FPM,
unsigned OptLevel) {
FPM.add(createVerifierPass()); // Verify that input is correct
PassManagerBuilder Builder;
Builder.OptLevel = OptLevel;