summaryrefslogtreecommitdiff
path: root/src/passes/ConstHoisting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/ConstHoisting.cpp')
-rw-r--r--src/passes/ConstHoisting.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/passes/ConstHoisting.cpp b/src/passes/ConstHoisting.cpp
index 1caf0eb28..a85b9cdf2 100644
--- a/src/passes/ConstHoisting.cpp
+++ b/src/passes/ConstHoisting.cpp
@@ -54,9 +54,7 @@ struct ConstHoisting : public WalkerPass<PostWalker<ConstHoisting>> {
void visitFunction(Function* curr) {
std::vector<Expression*> prelude;
- for (auto& pair : uses) {
- auto value = pair.first;
- auto& vec = pair.second;
+ for (auto& [value, vec] : uses) {
auto num = vec.size();
if (worthHoisting(value, num)) {
prelude.push_back(hoist(vec));