Use the range variant of transform instead of unpacking begin/end

No functionality change is intended.

llvm-svn: 278477
This commit is contained in:
David Majnemer 2016-08-12 04:32:45 +00:00
parent 2d006e7673
commit 91a02f5bee
2 changed files with 4 additions and 5 deletions

View File

@ -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.

View File

@ -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;
}