[llvm] r278477 - Use the range variant of transform instead of unpacking begin/end

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 21:32:45 PDT 2016


Author: majnemer
Date: Thu Aug 11 23:32:45 2016
New Revision: 278477

URL: http://llvm.org/viewvc/llvm-project?rev=278477&view=rev
Log:
Use the range variant of transform instead of unpacking begin/end

No functionality change is intended.

Modified:
    llvm/trunk/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp
    llvm/trunk/tools/llvm-nm/llvm-nm.cpp

Modified: llvm/trunk/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp?rev=278477&r1=278476&r2=278477&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp Thu Aug 11 23:32:45 2016
@@ -152,8 +152,7 @@ bool AArch64RedundantCopyElimination::op
   // 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.

Modified: llvm/trunk/tools/llvm-nm/llvm-nm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-nm/llvm-nm.cpp?rev=278477&r1=278476&r2=278477&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-nm/llvm-nm.cpp (original)
+++ llvm/trunk/tools/llvm-nm/llvm-nm.cpp Thu Aug 11 23:32:45 2016
@@ -1066,9 +1066,9 @@ static bool checkMachOAndArchFlags(Symbo
     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;
   }




More information about the llvm-commits mailing list