From c1485f4b7d044724b3dbc1011f3c3a8a53132010 Mon Sep 17 00:00:00 2001 From: EdB Date: Sun, 19 Apr 2015 10:50:19 +0200 Subject: [PATCH] clover: remove pre llvm 3.5.0 compatibility code Acked-by: Francisco Jerez Reviewed-by: Tom Stellard --- .../state_trackers/clover/llvm/invocation.cpp | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp index 4da62b9b70c..e07d95b1dbe 100644 --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp @@ -29,21 +29,14 @@ #include #include #include -#if HAVE_LLVM < 0x0305 -#include -#else #include #include #include -#endif #include #include #include #include #include -#if HAVE_LLVM < 0x0305 -#include -#endif #if HAVE_LLVM >= 0x0307 #include #else @@ -328,9 +321,7 @@ namespace { llvm::Function *kernel = *I; export_list.push_back(kernel->getName().data()); } -#if HAVE_LLVM < 0x0305 - PM.add(new llvm::DataLayout(mod)); -#elif HAVE_LLVM < 0x0306 +#if HAVE_LLVM < 0x0306 PM.add(new llvm::DataLayoutPass(mod)); #elif HAVE_LLVM < 0x0307 PM.add(new llvm::DataLayoutPass()); @@ -356,11 +347,7 @@ namespace { compat::vector args; llvm::Function *kernel_func = mod->getFunction(kernel_name); -#if HAVE_LLVM < 0x0305 - llvm::DataLayout TD(kernel_func->getParent()->getDataLayout()); -#else - llvm::DataLayout TD(mod); -#endif + llvm::DataLayout TD(mod); for (llvm::Function::const_arg_iterator I = kernel_func->arg_begin(), E = kernel_func->arg_end(); I != E; ++I) { @@ -651,8 +638,6 @@ namespace { return m; } -#if HAVE_LLVM >= 0x0305 - void diagnostic_handler(const llvm::DiagnosticInfo &di, void *data) { if (di.getSeverity() == llvm::DS_Error) { @@ -667,8 +652,6 @@ namespace { } } -#endif - void init_targets() { static bool targets_initialized = false; @@ -721,9 +704,7 @@ clover::compile_program_llvm(const compat::string &source, llvm::LLVMContext llvm_ctx; unsigned optimization_level; -#if HAVE_LLVM >= 0x0305 llvm_ctx.setDiagnosticHandler(diagnostic_handler, &r_log); -#endif if (get_debug_flags() & DBG_CLC) debug_log(source, ".cl"); -- 2.30.2