Skip to content

Commit

Permalink
Use the range variant of transform instead of unpacking begin/end
Browse files Browse the repository at this point in the history
No functionality change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278477 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
majnemer committed Aug 12, 2016
1 parent ac0eb3d commit 7e45eb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions lib/Target/AArch64/AArch64RedundantCopyElimination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions tools/llvm-nm/llvm-nm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7e45eb5

Please sign in to comment.