From 4cc530f452436a5304a628d1428ed7f07247a175 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 10 Oct 2012 21:00:13 +0000 Subject: [PATCH] radeon/llvm: Fix build with LLVM 3.2 --- src/gallium/drivers/radeon/radeon_llvm_emit.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp index 2f2eb4cb48e..21661a05002 100644 --- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp @@ -36,13 +36,16 @@ #include #include #include -#include #include - #include - #include +#if HAVE_LLVM < 0x0302 +#include +#else +#include +#endif + #include #include #include @@ -120,7 +123,11 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes, )); TargetMachine &AMDGPUTargetMachine = *tm.get(); PassManager PM; +#if HAVE_LLVM < 0x0302 PM.add(new TargetData(*AMDGPUTargetMachine.getTargetData())); +#else + PM.add(new DataLayout(*AMDGPUTargetMachine.getDataLayout())); +#endif PM.add(createPromoteMemoryToRegisterPass()); AMDGPUTargetMachine.setAsmVerbosityDefault(true); -- 2.30.2