[Mesa-dev] [PATCH 2/2] radeon/llvm: Fix build with LLVM 3.3
Tom Stellard
tom at stellard.net
Wed Feb 13 13:43:58 PST 2013
From: Tom Stellard <thomas.stellard at amd.com>
---
src/gallium/drivers/r600/llvm_wrapper.cpp | 4 ++++
src/gallium/drivers/radeon/radeon_llvm_emit.cpp | 9 ++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/r600/llvm_wrapper.cpp b/src/gallium/drivers/r600/llvm_wrapper.cpp
index 81f5397..ae2f4d2 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 < 0x0303
#include <llvm/LLVMContext.h>
+#else
+#include <llvm/IR/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..0491e64 100644
--- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
+++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
@@ -25,8 +25,16 @@
*/
#include "radeon_llvm_emit.h"
+#if HAVE_LLVM < 0x0303
#include <llvm/LLVMContext.h>
#include <llvm/Module.h>
+#include <llvm/DataLayout.h>
+#else
+#include <llvm/IR/LLVMContext.h>
+#include <llvm/IR/Module.h>
+#include <llvm/IR/DataLayout.h>
+#endif
+
#include <llvm/PassManager.h>
#include <llvm/ADT/Triple.h>
#include <llvm/Support/FormattedStream.h>
@@ -39,7 +47,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>
--
1.7.11.4
More information about the mesa-dev
mailing list