Use range algorithms instead of unpacking begin/end

No functionality change is intended.

llvm-svn: 278417
This commit is contained in:
David Majnemer
2016-08-11 21:15:00 +00:00
parent 1b689da04e
commit 0a16c22846
46 changed files with 137 additions and 153 deletions

View File

@@ -920,7 +920,7 @@ SmallVector<Instruction *, 8> llvm::findDefsUsedOutsideOfLoop(Loop *L) {
// be adapted into a pointer.
for (auto &Inst : *Block) {
auto Users = Inst.users();
if (std::any_of(Users.begin(), Users.end(), [&](User *U) {
if (any_of(Users, [&](User *U) {
auto *Use = cast<Instruction>(U);
return !L->contains(Use->getParent());
}))