summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover/llvm/compat.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/clover/llvm/compat.hpp')
-rw-r--r--src/gallium/state_trackers/clover/llvm/compat.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/compat.hpp b/src/gallium/state_trackers/clover/llvm/compat.hpp
index b22ecfa6b2e..23b111d7104 100644
--- a/src/gallium/state_trackers/clover/llvm/compat.hpp
+++ b/src/gallium/state_trackers/clover/llvm/compat.hpp
@@ -198,6 +198,16 @@ namespace clover {
f(mod.getError().message());
#endif
}
+
+ template<typename T> void
+ set_diagnostic_handler(::llvm::LLVMContext &ctx,
+ T *diagnostic_handler, void *data) {
+#if HAVE_LLVM >= 0x0600
+ ctx.setDiagnosticHandlerCallBack(diagnostic_handler, data);
+#else
+ ctx.setDiagnosticHandler(diagnostic_handler, data);
+#endif
+ }
}
}
}