[Mlir-commits] [mlir] [MLIR][Python] Remove partial LLVM APIs in python bindings (2/n) (PR #178529)
Jakub Kuderski
llvmlistbot at llvm.org
Wed Jan 28 17:49:31 PST 2026
================
@@ -1497,13 +1500,13 @@ static void populateResultTypes(std::string_view name, nb::list resultTypeList,
.c_str());
}
resultSegmentLengths.reserve(resultTypeList.size());
- for (const auto &it :
- llvm::enumerate(llvm::zip(resultTypeList, resultSegmentSpec))) {
- int segmentSpec = std::get<1>(it.value());
+ size_t size = resultSegmentSpec.size();
+ for (size_t index = 0; index < size; ++index) {
----------------
kuhar wrote:
nit: this is the canonical way to write a loop like this in llvm
```suggestion
size_t size = resultSegmentSpec.size();
for (size_t i = 0, e = resultSegmentSpec.size(); i < e; ++e) {
```
(yours is completely fine, it's just that this format is what most of the codebase uses)
https://github.com/llvm/llvm-project/pull/178529
More information about the Mlir-commits
mailing list