[PATCH] D39384: Add and make use of llvm::for_each
Aaron Ballman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 27 13:06:38 PDT 2017
aaron.ballman created this revision.
Herald added a subscriber: mehdi_amini.
This patch introduces a range-based adapter for `std::for_each()`, similar to other extensions to <algorithm>. It's intended to be used as a replacement for `std::for_each()` when the full range is easily available, thus making the code easier to understand. It could also be used as a replacement for range-based for loops, though it may be less of a win there.
It also switches cases within LLVM to use the new facilities.
https://reviews.llvm.org/D39384
Files:
include/llvm/ADT/STLExtras.h
lib/LTO/LTOCodeGenerator.cpp
lib/Target/Hexagon/HexagonVectorLoopCarriedReuse.cpp
lib/Transforms/Utils/SplitModule.cpp
tools/llvm-cxxdump/llvm-cxxdump.cpp
tools/llvm-mcmarkup/llvm-mcmarkup.cpp
tools/llvm-nm/llvm-nm.cpp
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-pdbutil/llvm-pdbutil.cpp
tools/llvm-readobj/llvm-readobj.cpp
tools/llvm-size/llvm-size.cpp
unittests/ADT/STLExtrasTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39384.120680.patch
Type: text/x-patch
Size: 7117 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171027/1e7c9800/attachment.bin>
More information about the llvm-commits
mailing list