summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit25963c6113ea82b568b7c1f48b24ad7c89a24279 (patch)
tree8646d1e025fab5f3379844083540d879d16bcb5e /llvm/include/llvm-c/Target.h
parente23003d1f1276f24dca2ec064f6cda0a64dec642 (diff)
downloadbcm5719-llvm-25963c6113ea82b568b7c1f48b24ad7c89a24279.tar.gz
bcm5719-llvm-25963c6113ea82b568b7c1f48b24ad7c89a24279.zip
"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! llvm-svn: 93079
Diffstat (limited to 'llvm/include/llvm-c/Target.h')
-rw-r--r--llvm/include/llvm-c/Target.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/include/llvm-c/Target.h b/llvm/include/llvm-c/Target.h
index 00571826487..5c85a479809 100644
--- a/llvm/include/llvm-c/Target.h
+++ b/llvm/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) \
OpenPOWER on IntegriCloud