forked from OSchip/llvm-project
[mlir][ods] (NFC) don't use std::function for map_range
This commit is contained in:
parent
19906262c9
commit
0ffef0c23b
|
@ -187,10 +187,7 @@ public:
|
||||||
|
|
||||||
/// Returns a range to iterate over the LiteralElements.
|
/// Returns a range to iterate over the LiteralElements.
|
||||||
auto getLiteralElements() const {
|
auto getLiteralElements() const {
|
||||||
// The use of std::function is unfortunate but necessary here. Lambda
|
function_ref<LiteralElement *(FormatElement * el)>
|
||||||
// functions cannot be copied but std::function can be copied. This copy
|
|
||||||
// constructor is used in llvm::zip.
|
|
||||||
std::function<LiteralElement *(FormatElement * el)>
|
|
||||||
literalElementCastConverter =
|
literalElementCastConverter =
|
||||||
[](FormatElement *el) { return cast<LiteralElement>(el); };
|
[](FormatElement *el) { return cast<LiteralElement>(el); };
|
||||||
return llvm::map_range(literalElements, literalElementCastConverter);
|
return llvm::map_range(literalElements, literalElementCastConverter);
|
||||||
|
|
Loading…
Reference in New Issue