summaryrefslogtreecommitdiff
path: root/tools/opt/opt.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2011-12-07 17:14:20 +0000
committerDuncan Sands <baldrick@free.fr>2011-12-07 17:14:20 +0000
commita3e585d4c2e7829ae854bc0049d904db6a989f4b (patch)
tree497bbd18e53194683bf49277d8500996de785ebd /tools/opt/opt.cpp
parentd8023263357b9d2d1c303e7738e0395b63d724dc (diff)
downloadllvm-a3e585d4c2e7829ae854bc0049d904db6a989f4b.tar.gz
llvm-a3e585d4c2e7829ae854bc0049d904db6a989f4b.tar.bz2
llvm-a3e585d4c2e7829ae854bc0049d904db6a989f4b.tar.xz
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
Diffstat (limited to 'tools/opt/opt.cpp')
-rw-r--r--tools/opt/opt.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index fe73462478..51613649b5 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;