summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/clover/llvm/invocation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index cda447d565d..5265d10330d 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -281,7 +281,11 @@ namespace {
}
for (unsigned i = 0; i < kernel_node->getNumOperands(); ++i) {
+#if HAVE_LLVM >= 0x0306
+ kernels.push_back(llvm::mdconst::dyn_extract<llvm::Function>(
+#else
kernels.push_back(llvm::dyn_cast<llvm::Function>(
+#endif
kernel_node->getOperand(i)->getOperand(0)));
}
}