From: Tom Stellard Date: Wed, 10 Oct 2012 21:00:13 +0000 (+0000) Subject: radeon/llvm: Fix build with LLVM 3.2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4cc530f452436a5304a628d1428ed7f07247a175;p=mesa.git radeon/llvm: Fix build with LLVM 3.2 --- 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);