mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-19 21:28:32 +02:00
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).
This commit is contained in:
parent
aed1f7ad34
commit
6da865bcfe
1 changed files with 2 additions and 2 deletions
|
|
@ -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 {};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue