[PATCH] D54813: [Common] Threads: use function_ref instead of std::function

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 21 14:07:41 PST 2018


MaskRay created this revision.
MaskRay added reviewers: ruiu, rnk, pcc.
Herald added a subscriber: llvm-commits.

Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D54813

Files:
  include/lld/Common/Threads.h


Index: include/lld/Common/Threads.h
===================================================================
--- include/lld/Common/Threads.h
+++ include/lld/Common/Threads.h
@@ -74,7 +74,7 @@
 }
 
 inline void parallelForEachN(size_t Begin, size_t End,
-                             std::function<void(size_t)> Fn) {
+                             llvm::function_ref<void(size_t)> Fn) {
   if (ThreadsEnabled)
     for_each_n(llvm::parallel::par, Begin, End, Fn);
   else


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54813.174982.patch
Type: text/x-patch
Size: 467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181121/a19e37b4/attachment.bin>


More information about the llvm-commits mailing list