Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llvm/lib/Target/M68k/M68kInstrInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ bool M68kInstrInfo::AnalyzeBranchImpl(MachineBasicBlock &MBB,
// Erase any instructions if allowed at the end of the scope.
std::vector<std::reference_wrapper<llvm::MachineInstr>> EraseList;
auto FinalizeOnReturn = llvm::make_scope_exit([&EraseList] {
std::for_each(EraseList.begin(), EraseList.end(),
[](auto &ref) { ref.get().eraseFromParent(); });
for (auto &Ref : EraseList)
Ref.get().eraseFromParent();
});

// Start from the bottom of the block and work up, examining the
Expand Down
8 changes: 4 additions & 4 deletions llvm/lib/Transforms/Coroutines/SpillUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,10 +552,10 @@ void sinkSpillUsesAfterCoroBegin(const DominatorTree &Dom,
Worklist.push_back(Inst);
}
};
std::for_each(Spills.begin(), Spills.end(),
[&](auto &I) { collectUsers(I.first); });
std::for_each(Allocas.begin(), Allocas.end(),
[&](auto &I) { collectUsers(I.Alloca); });
for (auto &I : Spills)
collectUsers(I.first);
for (auto &I : Allocas)
collectUsers(I.Alloca);

// Recursively collect users before coro.begin.
while (!Worklist.empty()) {
Expand Down