- 'analyze' and 'as' now explicitly verify input because AsmParser doesn't.
authorChris Lattner <sabre@nondot.org>
Fri, 30 Aug 2002 22:54:37 +0000 (22:54 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 30 Aug 2002 22:54:37 +0000 (22:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3551 91177308-0d34-0410-b5e6-96231b3b80d8

tools/analyze/analyze.cpp

index a40b8b8d1ff28bcbe3f30da1b1cb3c7c6ebbc100..eb78d915b449096bd81826f543d83b6ad35fda3a 100644 (file)
@@ -14,6 +14,7 @@
 #include "llvm/PassManager.h"
 #include "llvm/Bytecode/Reader.h"
 #include "llvm/Assembly/Parser.h"
+#include "llvm/Analysis/Verifier.h"
 #include "llvm/Support/PassNameParser.h"
 #include <algorithm>
 
@@ -114,6 +115,9 @@ int main(int argc, char **argv) {
   //
   PassManager Passes;
 
+  // Make sure the input LLVM is well formed.
+  Passes.add(createVerifierPass());
+
   // Create a new optimization pass for each one specified on the command line
   for (unsigned i = 0; i < AnalysesList.size(); ++i) {
     const PassInfo *Analysis = AnalysesList[i];