diff options
author | River Riddle <riddleriver@gmail.com> | 2020-10-31 14:21:49 -0700 |
---|---|---|
committer | River Riddle <riddleriver@gmail.com> | 2020-10-31 14:21:49 -0700 |
commit | 235dfcf70abca65dba5d80f1a42d1485bab8980c (patch) | |
tree | 09a055aed0a347f2da02ca257ba1df5a158ee5e5 | |
parent | aab71d44431eabfb65fbbc8a2930cb6d34b7e2be (diff) | |
download | llvm-235dfcf70abca65dba5d80f1a42d1485bab8980c.zip llvm-235dfcf70abca65dba5d80f1a42d1485bab8980c.tar.gz llvm-235dfcf70abca65dba5d80f1a42d1485bab8980c.tar.bz2 |
[mlir][AsmPrinter] Fix crash in windows build after D89354
Switch to an index based loop instead of using enumerate.
-rw-r--r-- | mlir/lib/IR/AsmPrinter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp index 790b50c..beb05ad 100644 --- a/mlir/lib/IR/AsmPrinter.cpp +++ b/mlir/lib/IR/AsmPrinter.cpp @@ -376,8 +376,8 @@ static void initializeAliases( continue; } // Otherwise, add the index to the name. - for (auto &symbolIt : llvm::enumerate(it.second)) - symbolToAlias.insert({symbolIt.value(), {it.first, symbolIt.index()}}); + for (int i = 0, e = it.second.size(); i < e; ++i) + symbolToAlias.insert({it.second[i], {it.first, i}}); } } |