summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdB <[email protected]>2015-04-19 10:50:19 +0200
committerTom Stellard <[email protected]>2015-04-20 18:11:04 +0000
commitc1485f4b7d044724b3dbc1011f3c3a8a53132010 (patch)
tree66d0ad1741b9d3c05e970f7da9d7bbdba8c8dfc3
parentf39cd716189f4b025f9c04cb3426c6b25b9eaf46 (diff)
clover: remove pre llvm 3.5.0 compatibility code
Acked-by: Francisco Jerez <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
-rw-r--r--src/gallium/state_trackers/clover/llvm/invocation.cpp23
1 files 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 <clang/Basic/TargetInfo.h>
#include <llvm/Bitcode/BitstreamWriter.h>
#include <llvm/Bitcode/ReaderWriter.h>
-#if HAVE_LLVM < 0x0305
-#include <llvm/Linker.h>
-#else
#include <llvm/Linker/Linker.h>
#include <llvm/IR/DiagnosticInfo.h>
#include <llvm/IR/DiagnosticPrinter.h>
-#endif
#include <llvm/IR/DerivedTypes.h>
#include <llvm/IR/LLVMContext.h>
#include <llvm/IR/Module.h>
#include <llvm/Support/SourceMgr.h>
#include <llvm/IRReader/IRReader.h>
-#if HAVE_LLVM < 0x0305
-#include <llvm/ADT/OwningPtr.h>
-#endif
#if HAVE_LLVM >= 0x0307
#include <llvm/IR/LegacyPassManager.h>
#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<module::argument> 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");