[llvm-commits] CVS: llvm/tools/llvm-as/llvm-as.cpp 
    Chris Lattner 
    lattner at cs.uiuc.edu
       
    Tue Jul 13 01:48:14 PDT 2004
    
    
  
Changes in directory llvm/tools/llvm-as:
llvm-as.cpp updated: 1.31 -> 1.32
---
Log message:
Actually, use an exception to stop verification.  This gives us much better
error messages because verification stops at the first error.
---
Diffs of the changes:  (+5 -1)
Index: llvm/tools/llvm-as/llvm-as.cpp
diff -u llvm/tools/llvm-as/llvm-as.cpp:1.31 llvm/tools/llvm-as/llvm-as.cpp:1.32
--- llvm/tools/llvm-as/llvm-as.cpp:1.31	Tue Jul 13 03:45:41 2004
+++ llvm/tools/llvm-as/llvm-as.cpp	Tue Jul 13 03:48:04 2004
@@ -57,9 +57,13 @@
       return 1;
     }
 
-    if (!DisableVerify && verifyModule(*M.get(), PrintMessageAction)) {
+    try {
+      if (!DisableVerify)
+        verifyModule(*M.get(), ThrowExceptionAction);
+    } catch (const std::string &Err) {
       std::cerr << argv[0]
                 << ": assembly parsed, but does not verify as correct!\n";
+      std::cerr << Err;
       return 1;
     }
   
    
    
More information about the llvm-commits
mailing list