summaryrefslogtreecommitdiff
path: root/include/llvm-c/Target.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-21 07:52:40 +0000
committerChris Lattner <sabre@nondot.org>2009-12-21 07:52:40 +0000
commitb6219ba3d609d7f65285a41bad86626f7436f00f (patch)
treeb8c8eed1950f7dd93d3d8b2d914e1ec339579121 /include/llvm-c/Target.h
parent3cf4d90f3d35a6d5293e46790121294e89976cc9 (diff)
downloadllvm-b6219ba3d609d7f65285a41bad86626f7436f00f.tar.gz
llvm-b6219ba3d609d7f65285a41bad86626f7436f00f.tar.bz2
llvm-b6219ba3d609d7f65285a41bad86626f7436f00f.tar.xz
improve compatibility with SWIG, patch by James Knight!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm-c/Target.h')
-rw-r--r--include/llvm-c/Target.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm-c/Target.h b/include/llvm-c/Target.h
index 43388512e8..0057182648 100644
--- a/include/llvm-c/Target.h
+++ b/include/llvm-c/Target.h
@@ -35,9 +35,11 @@ typedef struct LLVMStructLayout *LLVMStructLayoutRef;
/* Declare all of the target-initialization functions that are available. */
#define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##TargetInfo();
#include "llvm/Config/Targets.def"
-
+#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
+
#define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##Target();
#include "llvm/Config/Targets.def"
+#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
/** LLVMInitializeAllTargetInfos - The main program should call this function if
it wants access to all available targets that LLVM is configured to
@@ -45,6 +47,7 @@ typedef struct LLVMStructLayout *LLVMStructLayoutRef;
static inline void LLVMInitializeAllTargetInfos() {
#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo();
#include "llvm/Config/Targets.def"
+#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
}
/** LLVMInitializeAllTargets - The main program should call this function if it
@@ -53,6 +56,7 @@ static inline void LLVMInitializeAllTargetInfos() {
static inline void LLVMInitializeAllTargets() {
#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target();
#include "llvm/Config/Targets.def"
+#undef LLVM_TARGET /* Explicit undef to make SWIG happier */
}
/** LLVMInitializeNativeTarget - The main program should call this function to