llvmpipe: Fix build with llvm 2.6.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 6 Nov 2009 15:08:05 +0000 (15:08 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 6 Nov 2009 15:08:05 +0000 (15:08 +0000)
Fixes bug 24949.

src/gallium/drivers/llvmpipe/lp_bld_misc.cpp
src/gallium/drivers/llvmpipe/lp_bld_misc.h

index c9acaf1f16c64d529bc4214617f1d7229bc8e534..d3f78c06d92a03c48c7c7c5b80435bcec08811ac 100644 (file)
@@ -26,8 +26,6 @@
  **************************************************************************/
 
 
-#include "llvm/Config/config.h"
-
 #include "pipe/p_config.h"
 
 #include "lp_bld_misc.h"
@@ -50,12 +48,13 @@ LLVMLinkInJIT(void)
 extern "C" int X86TargetMachineModule;
 
 
-void
+int
 LLVMInitializeNativeTarget(void)
 {
 #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
-   X86TargetMachineModule = 1;                 
+   X86TargetMachineModule = 1;
 #endif
+   return 0;
 }
 
 
index 51a84c5e25871b74c155cacbaa190be35d2027c8..0e787e0b9cbb315e4541b297e124b9d4f2570d12 100644 (file)
 #define LP_BLD_MISC_H
 
 
+#include "llvm/Config/config.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 
+#ifndef LLVM_NATIVE_ARCH
+
 void
 LLVMLinkInJIT(void);
 
-void
+int
 LLVMInitializeNativeTarget(void);
 
+#endif /* !LLVM_NATIVE_ARCH */
+
 
 #ifdef __cplusplus
 }