aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm-c/Target.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-09 22:27:07 +0000
committerChris Lattner <sabre@nondot.org>2010-01-09 22:27:07 +0000
commit2d13a3e7c91f7e351b5550832db77482bde3f0fa (patch)
tree06a78b36c6cc4de9d05158641373fb4e1bde72a0 /include/llvm-c/Target.h
parent3e1a3a0e3bba4d20037271d13e7cb230ca6d959b (diff)
downloadexternal_llvm-2d13a3e7c91f7e351b5550832db77482bde3f0fa.zip
external_llvm-2d13a3e7c91f7e351b5550832db77482bde3f0fa.tar.gz
external_llvm-2d13a3e7c91f7e351b5550832db77482bde3f0fa.tar.bz2
"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 'include/llvm-c/Target.h')
-rw-r--r--include/llvm-c/Target.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/llvm-c/Target.h b/include/llvm-c/Target.h
index 0057182..5c85a47 100644
--- a/include/llvm-c/Target.h
+++ b/include/llvm-c/Target.h
@@ -26,8 +26,7 @@
extern "C" {
#endif
-enum { LLVMBigEndian, LLVMLittleEndian };
-typedef int LLVMByteOrdering;
+enum LLVMByteOrdering { LLVMBigEndian, LLVMLittleEndian };
typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef;
typedef struct LLVMStructLayout *LLVMStructLayoutRef;
@@ -62,7 +61,7 @@ static inline void LLVMInitializeAllTargets() {
/** LLVMInitializeNativeTarget - The main program should call this function to
initialize the native target corresponding to the host. This is useful
for JIT applications to ensure that the target gets linked in correctly. */
-static inline int LLVMInitializeNativeTarget() {
+static inline LLVMBool LLVMInitializeNativeTarget() {
/* If we have a native target, initialize it to ensure it is linked in. */
#ifdef LLVM_NATIVE_ARCH
#define DoInit2(TARG) \