[Mesa-dev] [PATCH 10/11] radeon, clover: Make it compile on LLVM >= r171366.
Johannes Obermayr
johannesobermayr at gmx.de
Fri Jan 11 18:23:33 PST 2013
---
src/gallium/drivers/r600/Makefile.am | 3 ++-
src/gallium/drivers/r600/llvm_wrapper.cpp | 4 ++++
src/gallium/drivers/radeon/radeon_llvm_emit.cpp | 10 ++++++++--
src/gallium/state_trackers/clover/llvm/invocation.cpp | 16 +++++++++-------
4 Dateien geändert, 23 Zeilen hinzugefügt(+), 10 Zeilen entfernt(-)
diff --git a/src/gallium/drivers/r600/Makefile.am b/src/gallium/drivers/r600/Makefile.am
index ac8e12b..2633c03 100644
--- a/src/gallium/drivers/r600/Makefile.am
+++ b/src/gallium/drivers/r600/Makefile.am
@@ -30,7 +30,8 @@ AM_CFLAGS += \
-I$(top_srcdir)/src/gallium/drivers/radeon/
AM_CXXFLAGS= \
- $(LLVM_CXXFLAGS)
+ $(LLVM_CXXFLAGS) \
+ $(DEFINES)
endif
if USE_R600_LLVM_COMPILER
diff --git a/src/gallium/drivers/r600/llvm_wrapper.cpp b/src/gallium/drivers/r600/llvm_wrapper.cpp
index 81f5397..cf9f741 100644
--- a/src/gallium/drivers/r600/llvm_wrapper.cpp
+++ b/src/gallium/drivers/r600/llvm_wrapper.cpp
@@ -1,6 +1,10 @@
#include <llvm/ADT/OwningPtr.h>
#include <llvm/ADT/StringRef.h>
+#if HAVE_LLVM > 0x0302
+#include <llvm/IR/LLVMContext.h>
+#else
#include <llvm/LLVMContext.h>
+#endif
#include <llvm/PassManager.h>
#include <llvm/Support/IRReader.h>
#include <llvm/Support/MemoryBuffer.h>
diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
index 903e102..b554d9b 100644
--- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
+++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
@@ -25,10 +25,17 @@
*/
#include "radeon_llvm_emit.h"
+#include <llvm/ADT/Triple.h>
+#if HAVE_LLVM > 0x0302
+#include <llvm/IR/DataLayout.h>
+#include <llvm/IR/LLVMContext.h>
+#include <llvm/IR/Module.h>
+#else
+#include <llvm/DataLayout.h>
#include <llvm/LLVMContext.h>
#include <llvm/Module.h>
+#endif
#include <llvm/PassManager.h>
-#include <llvm/ADT/Triple.h>
#include <llvm/Support/FormattedStream.h>
#include <llvm/Support/Host.h>
#include <llvm/Support/IRReader.h>
@@ -39,7 +46,6 @@
#include <llvm/Target/TargetMachine.h>
#include <llvm/Transforms/Scalar.h>
#include <llvm-c/Target.h>
-#include <llvm/DataLayout.h>
#include <iostream>
#include <stdlib.h>
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index 0bd8e22..1d09acc 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -28,10 +28,18 @@
#include <clang/CodeGen/CodeGenAction.h>
#include <llvm/Bitcode/BitstreamWriter.h>
#include <llvm/Bitcode/ReaderWriter.h>
+#if HAVE_LLVM > 0x0302
+#include <llvm/IR/DataLayout.h>
+#include <llvm/IR/DerivedTypes.h>
+#include <llvm/IR/LLVMContext.h>
+#include <llvm/IR/Module.h>
+#else
+#include <llvm/DataLayout.h>
#include <llvm/DerivedTypes.h>
-#include <llvm/Linker.h>
#include <llvm/LLVMContext.h>
#include <llvm/Module.h>
+#endif
+#include <llvm/Linker.h>
#include <llvm/PassManager.h>
#include <llvm/Support/TargetSelect.h>
#include <llvm/Support/MemoryBuffer.h>
@@ -39,12 +47,6 @@
#include <llvm/Transforms/IPO.h>
#include <llvm/Transforms/IPO/PassManagerBuilder.h>
-#if HAVE_LLVM < 0x0302
-#include <llvm/Target/TargetData.h>
-#else
-#include <llvm/DataLayout.h>
-#endif
-
#include "pipe/p_state.h"
#include "util/u_memory.h"
--
1.7.10.4
More information about the mesa-dev
mailing list