diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-09 22:27:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-09 22:27:07 +0000 |
commit | d686c8e73f74e37ab5f647b65a12051ee6cbad16 (patch) | |
tree | 06a78b36c6cc4de9d05158641373fb4e1bde72a0 /lib/Analysis/Analysis.cpp | |
parent | 95fa80af6f0451bb52cd2d86dea1b165c5e2675a (diff) |
"In order to ease automatic bindings generation, it would be helpful if boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for."
Patch by James Y Knight!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93079 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/Analysis.cpp')
-rw-r--r-- | lib/Analysis/Analysis.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Analysis/Analysis.cpp b/lib/Analysis/Analysis.cpp index f8cb32321b..398dec7dd0 100644 --- a/lib/Analysis/Analysis.cpp +++ b/lib/Analysis/Analysis.cpp @@ -13,11 +13,11 @@ using namespace llvm; -int LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action, - char **OutMessages) { +LLVMBool LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action, + char **OutMessages) { std::string Messages; - int Result = verifyModule(*unwrap(M), + LLVMBool Result = verifyModule(*unwrap(M), static_cast<VerifierFailureAction>(Action), OutMessages? &Messages : 0); @@ -27,7 +27,7 @@ int LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action, return Result; } -int LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action) { +LLVMBool LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action) { return verifyFunction(*unwrap<Function>(Fn), static_cast<VerifierFailureAction>(Action)); } |