summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-07-06 18:00:01 +0000
committerChris Lattner <sabre@nondot.org>2006-07-06 18:00:01 +0000
commit1d662a6afcbf8afb809e7f40093d2e9e0a888fdc (patch)
tree3f45d981e6a459d57026ff02aa07a2bfd27df200
parent90ac1c07759460e4b07f9ffe0e44fec219eddfdf (diff)
downloadllvm-1d662a6afcbf8afb809e7f40093d2e9e0a888fdc.tar.gz
llvm-1d662a6afcbf8afb809e7f40093d2e9e0a888fdc.tar.bz2
llvm-1d662a6afcbf8afb809e7f40093d2e9e0a888fdc.tar.xz
Change the verifier to never throw an exception. Instead verifyModule can
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
-rw-r--r--include/llvm/Analysis/Verifier.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Analysis/Verifier.h b/include/llvm/Analysis/Verifier.h
index 52b1fee717..dd914a490f 100644
--- a/include/llvm/Analysis/Verifier.h
+++ b/include/llvm/Analysis/Verifier.h
@@ -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