Skip to content

Commit 5c0753d

Browse files
committed
refactor: replace templated forEachAttr with std::function version
1 parent 827870e commit 5c0753d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/Bindings/Python/IRCore.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2730,8 +2730,8 @@ class PyOpAttributeMap {
27302730
operation->get(), toMlirStringRef(name)));
27312731
}
27322732

2733-
template <typename F>
2734-
auto forEachAttr(F fn) {
2733+
void
2734+
forEachAttr(const std::function<void(MlirStringRef, MlirAttribute)> &fn) {
27352735
intptr_t n = mlirOperationGetNumAttributes(operation->get());
27362736
for (intptr_t i = 0; i < n; ++i) {
27372737
MlirNamedAttribute na = mlirOperationGetAttribute(operation->get(), i);

0 commit comments

Comments
 (0)