Change the verifier to never throw an exception.  Instead verifyModule canoptionally return the string error, which is an easier api for clients touse anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29017 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
index 39131cf..2ac7834 100644
--- a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
+++ b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
@@ -73,23 +73,10 @@
 
     if ( M && Verify ) {
       std::string verificationMsg;
-      try {
-        verifyModule( *M, ThrowExceptionAction );
-      } catch (std::string& errmsg ) {
-        verificationMsg = errmsg;
-      }
-      if ( verificationMsg.length() > 0 )
+      if (verifyModule(*M, ReturnStatusAction, &verificationMsg))
         std::cerr << "Final Verification Message: " << verificationMsg << "\n";
     }
 
-
-    // If there was an error, print it and stop.
-    if ( ErrorMessage.size() ) {
-      std::cerr << argv[0] << ": " << ErrorMessage << "\n";
-      return 1;
-    }
-
-
     if (Out != &std::cout) {
       ((std::ofstream*)Out)->close();
       delete Out;