From 91a02f5beef6b8ba2ae9e79b04259e6c3573fb73 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Fri, 12 Aug 2016 04:32:45 +0000 Subject: [PATCH] Use the range variant of transform instead of unpacking begin/end No functionality change is intended. llvm-svn: 278477 --- llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp | 3 +-- llvm/tools/llvm-nm/llvm-nm.cpp | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp b/llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp index 8d891ca..26a1f5d 100644 --- a/llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp +++ b/llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp @@ -152,8 +152,7 @@ bool AArch64RedundantCopyElimination::optimizeCopy(MachineBasicBlock *MBB) { // CBZ/CBNZ. Conservatively mark as much as we can live. CompBr->clearRegisterKills(SmallestDef, TRI); - if (std::none_of(TargetRegs.begin(), TargetRegs.end(), - [&](unsigned Reg) { return MBB->isLiveIn(Reg); })) + if (none_of(TargetRegs, [&](unsigned Reg) { return MBB->isLiveIn(Reg); })) MBB->addLiveIn(TargetReg); // Clear any kills of TargetReg between CompBr and the last removed COPY. diff --git a/llvm/tools/llvm-nm/llvm-nm.cpp b/llvm/tools/llvm-nm/llvm-nm.cpp index 7eb9374..936a5c3 100644 --- a/llvm/tools/llvm-nm/llvm-nm.cpp +++ b/llvm/tools/llvm-nm/llvm-nm.cpp @@ -1066,9 +1066,9 @@ static bool checkMachOAndArchFlags(SymbolicFile *O, std::string &Filename) { H = MachO->MachOObjectFile::getHeader(); T = MachOObjectFile::getArchTriple(H.cputype, H.cpusubtype); } - if (std::none_of( - ArchFlags.begin(), ArchFlags.end(), - [&](const std::string &Name) { return Name == T.getArchName(); })) { + if (none_of(ArchFlags, [&](const std::string &Name) { + return Name == T.getArchName(); + })) { error("No architecture specified", Filename); return false; } -- 2.7.4