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

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



Changes in directory llvm/tools/llvm2cpp:

llvm2cpp.cpp updated: 1.3 -> 1.4
---
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:  (+10 -8)

 llvm2cpp.cpp |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)


Index: llvm/tools/llvm2cpp/llvm2cpp.cpp
diff -u llvm/tools/llvm2cpp/llvm2cpp.cpp:1.3 llvm/tools/llvm2cpp/llvm2cpp.cpp:1.4
--- llvm/tools/llvm2cpp/llvm2cpp.cpp:1.3	Mon May 29 13:06:28 2006
+++ llvm/tools/llvm2cpp/llvm2cpp.cpp	Thu Jul  6 13:01:01 2006
@@ -59,14 +59,16 @@
       return 1;
     }
 
-    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;
+    // FIXME: llvm2cpp should read .bc files and thus not run the verifier
+    // explicitly!
+    if (!DisableVerify) {
+      std::string Err;
+      if (verifyModule(*M.get(), ReturnStatusAction, &Err)) {
+        std::cerr << argv[0]
+                  << ": assembly parsed, but does not verify as correct!\n";
+        std::cerr << Err;
+        return 1;
+      } 
     }
 
     if (OutputFilename != "") {   // Specified an output filename?






More information about the llvm-commits mailing list