radeon/llvm: Fix build with LLVM 3.3
authorTom Stellard <thomas.stellard@amd.com>
Wed, 13 Feb 2013 20:59:41 +0000 (20:59 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Tue, 19 Feb 2013 15:52:55 +0000 (15:52 +0000)
src/gallium/drivers/r600/llvm_wrapper.cpp
src/gallium/drivers/radeon/radeon_llvm_emit.cpp

index 81f53974d11cc8b27a13bb8eac080cfb43d12138..ae2f4d24f74be78fa5335c5a60aa6ceb5bd81bfe 100644 (file)
@@ -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>
index 903e1028a095db1735f85a74962be2cd969ff668..0491e64bb6ff5bf37e6a946dc66c0438640e8741 100644 (file)
  */
 #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>