projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aab71d4
)
[mlir][AsmPrinter] Fix crash in windows build after D89354
author
River Riddle
<riddleriver@gmail.com>
Sat, 31 Oct 2020 21:21:49 +0000
(14:21 -0700)
committer
River Riddle
<riddleriver@gmail.com>
Sat, 31 Oct 2020 21:21:49 +0000
(14:21 -0700)
Switch to an index based loop instead of using enumerate.
mlir/lib/IR/AsmPrinter.cpp
patch
|
blob
|
history
diff --git
a/mlir/lib/IR/AsmPrinter.cpp
b/mlir/lib/IR/AsmPrinter.cpp
index
790b50c
..
beb05ad
100644
(file)
--- 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
}});
}
}