[llvm-commits] CVS: llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Jul 6 11:01:15 PDT 2006



Changes in directory llvm/tools/llvm-bcanalyzer:

llvm-bcanalyzer.cpp updated: 1.6 -> 1.7
---
Log message:

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


---
Diffs of the changes:  (+1 -14)

 llvm-bcanalyzer.cpp |   15 +--------------
 1 files changed, 1 insertion(+), 14 deletions(-)


Index: llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
diff -u llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp:1.6 llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp:1.7
--- llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp:1.6	Thu Apr 21 18:59:35 2005
+++ llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp	Thu Jul  6 13:01:01 2006
@@ -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;






More information about the llvm-commits mailing list