[PATCH] D68924: CodeExtractor: NFC: Use Range based loop
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 12 20:48:59 PDT 2019
tejohnson added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/CodeExtractor.cpp:963
// blocks were originally in the code region.
std::vector<User *> Users(header->user_begin(), header->user_end());
+ for (auto &U : Users)
----------------
You can use a range iterator over the users accessed from header directly, rather than creating a vector:
for (auto &U : header->users())
Looks like the code earlier at line 944-5 can be transformed similarly
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68924/new/
https://reviews.llvm.org/D68924
More information about the llvm-commits
mailing list