[llvm-commits] [llvm] r91822 - /llvm/trunk/include/llvm-c/Target.h

Chris Lattner sabre at nondot.org
Sun Dec 20 23:52:40 PST 2009


Author: lattner
Date: Mon Dec 21 01:52:40 2009
New Revision: 91822

URL: http://llvm.org/viewvc/llvm-project?rev=91822&view=rev
Log:
improve compatibility with SWIG, patch by James Knight!

Modified:
    llvm/trunk/include/llvm-c/Target.h

Modified: llvm/trunk/include/llvm-c/Target.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Target.h?rev=91822&r1=91821&r2=91822&view=diff

==============================================================================
--- llvm/trunk/include/llvm-c/Target.h (original)
+++ llvm/trunk/include/llvm-c/Target.h Mon Dec 21 01:52:40 2009
@@ -35,9 +35,11 @@
 /* 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 @@
 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 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





More information about the llvm-commits mailing list