diff options
author | Greg V <[email protected]> | 2018-07-04 20:15:04 +0300 |
---|---|---|
committer | Matt Turner <[email protected]> | 2019-10-09 14:54:07 -0700 |
commit | 6da865bcfeecaa9ab4bb1632416d813f7df24f3e (patch) | |
tree | 3478c02dbb20ecee973b6113b032579cd3764f4c | |
parent | aed1f7ad34619de9c41a529627babc857eac9a97 (diff) |
clover: use iterator_range in get_kernel_nodes
With libc++ (LLVM's STL implementation), the original code does not compile because an
appropriate vector constructor cannot be found (for the _ForwardIterator one, requirement
is_constructible is not satisfied).
-rw-r--r-- | src/gallium/state_trackers/clover/llvm/metadata.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/metadata.hpp b/src/gallium/state_trackers/clover/llvm/metadata.hpp index d23f317c0a5..b2f3e5d95b2 100644 --- a/src/gallium/state_trackers/clover/llvm/metadata.hpp +++ b/src/gallium/state_trackers/clover/llvm/metadata.hpp @@ -39,11 +39,11 @@ namespace clover { namespace llvm { namespace detail { - inline std::vector<const ::llvm::MDNode *> + inline iterator_range< ::llvm::NamedMDNode::const_op_iterator> get_kernel_nodes(const ::llvm::Module &mod) { if (const ::llvm::NamedMDNode *n = mod.getNamedMetadata("opencl.kernels")) - return { n->op_begin(), n->op_end() }; + return range(n->op_begin(), n->op_end()); else return {}; } |