From 05c143cc049a87c515ecdc5695e5912da60cf5cb Mon Sep 17 00:00:00 2001 From: Johannes Obermayr Date: Thu, 20 Dec 2012 20:56:17 +0100 Subject: Support LLVM >= 3.2 on radeonsi and opencl. Tom Stellard: - Backend now has same name for all LLVM versions - Add missing LLVM_VERSION_INT definition --- src/gallium/drivers/radeon/radeon_llvm_emit.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gallium') diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp index 21661a05002..b889f029694 100644 --- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp @@ -89,10 +89,17 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes, Triple AMDGPUTriple(sys::getDefaultTargetTriple()); +#if HAVE_LLVM == 0x0302 LLVMInitializeAMDGPUTargetInfo(); LLVMInitializeAMDGPUTarget(); LLVMInitializeAMDGPUTargetMC(); LLVMInitializeAMDGPUAsmPrinter(); +#else + LLVMInitializeR600TargetInfo(); + LLVMInitializeR600Target(); + LLVMInitializeR600TargetMC(); + LLVMInitializeR600AsmPrinter(); +#endif std::string err; const Target * AMDGPUTarget = TargetRegistry::lookupTarget("r600", err); -- cgit v1.2.3