[Mesa-dev] [PATCH] clover: Fix build after llvm r223802

Aaron Watry awatry at gmail.com
Tue Dec 9 15:42:42 PST 2014


Signed-off-by: Aaron Watry <awatry at gmail.com>
---
 src/gallium/state_trackers/clover/llvm/invocation.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index cda447d..5265d10 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)));
       }
    }
-- 
2.1.0



More information about the mesa-dev mailing list