1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

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 95fedaaedc
commit 3a66736cb0
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. // CBZ/CBNZ. Conservatively mark as much as we can live.
CompBr->clearRegisterKills(SmallestDef, TRI); CompBr->clearRegisterKills(SmallestDef, TRI);
if (std::none_of(TargetRegs.begin(), TargetRegs.end(), if (none_of(TargetRegs, [&](unsigned Reg) { return MBB->isLiveIn(Reg); }))
[&](unsigned Reg) { return MBB->isLiveIn(Reg); }))
MBB->addLiveIn(TargetReg); MBB->addLiveIn(TargetReg);
// Clear any kills of TargetReg between CompBr and the last removed COPY. // 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(); H = MachO->MachOObjectFile::getHeader();
T = MachOObjectFile::getArchTriple(H.cputype, H.cpusubtype); T = MachOObjectFile::getArchTriple(H.cputype, H.cpusubtype);
} }
if (std::none_of( if (none_of(ArchFlags, [&](const std::string &Name) {
ArchFlags.begin(), ArchFlags.end(), return Name == T.getArchName();
[&](const std::string &Name) { return Name == T.getArchName(); })) { })) {
error("No architecture specified", Filename); error("No architecture specified", Filename);
return false; return false;
} }