clover: Fix build after llvm r221375
authorJan Vesely <jan.vesely@rutgers.edu>
Thu, 6 Nov 2014 16:46:41 +0000 (11:46 -0500)
committerTom Stellard <thomas.stellard@amd.com>
Thu, 6 Nov 2014 16:39:36 +0000 (11:39 -0500)
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
src/gallium/state_trackers/clover/llvm/invocation.cpp

index e9538224bf6730d276aefac4499f8d4624a9b8d3..3a4fcf0bc8b1f6312c6705a4c56cd31f82af464c 100644 (file)
@@ -282,7 +282,11 @@ namespace {
 
       for (unsigned i = 0; i < kernel_node->getNumOperands(); ++i) {
          kernels.push_back(llvm::dyn_cast<llvm::Function>(
+#if HAVE_LLVM >= 0x0306
+                                    kernel_node->getOperandAsMDNode(i)->getOperand(0)));
+#else
                                     kernel_node->getOperand(i)->getOperand(0)));
+#endif
       }
    }