Change the verifier to never throw an exception. Instead verifyModule can
authorChris Lattner <sabre@nondot.org>
Thu, 6 Jul 2006 18:00:01 +0000 (18:00 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 6 Jul 2006 18:00:01 +0000 (18:00 +0000)
optionally return the string error, which is an easier api for clients to
use anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29016 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/Verifier.h

index 52b1fee7178246b33d6cbdc0c70dbfa8b71a4910..dd914a490f88b723bfaedc941e0586857c18097a 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef LLVM_ANALYSIS_VERIFIER_H
 #define LLVM_ANALYSIS_VERIFIER_H
 
+#include <string>
+
 namespace llvm {
 
 class FunctionPass;
@@ -35,7 +37,6 @@ class Function;
 /// actions are listed below.
 enum VerifierFailureAction {
   AbortProcessAction,   ///< verifyModule will print to stderr and abort()
-  ThrowExceptionAction, ///< verifyModule will throw errors as std::string
   PrintMessageAction,   ///< verifyModule will print to stderr and return true
   ReturnStatusAction    ///< verifyModule will just return true
 };
@@ -58,7 +59,8 @@ FunctionPass *createVerifierPass(
 
 bool verifyModule(
   const Module &M,  ///< The module to be verified
-  VerifierFailureAction action = AbortProcessAction ///< Action to take
+  VerifierFailureAction action = AbortProcessAction, ///< Action to take
+  std::string *ErrorInfo = 0      ///< Information about failures.
 );
 
 // verifyFunction - Check a function for errors, useful for use when debugging a