From a3e585d4c2e7829ae854bc0049d904db6a989f4b Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Wed, 7 Dec 2011 17:14:20 +0000 Subject: [PATCH] When doing "opt -O2" verify the bitcode like is done for "opt -std-compile-opts". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146036 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/opt/opt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index fe73462478e..51613649b57 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -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;