[Core] Fix "variable ‘comp’ has function type" error shown by gcc
authorSimon Atanasyan <simon@atanasyan.com>
Fri, 30 Jan 2015 05:42:57 +0000 (05:42 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Fri, 30 Jan 2015 05:42:57 +0000 (05:42 +0000)
llvm-svn: 227558

lld/include/lld/Core/Parallel.h

index f1c2002..2b25e64 100644 (file)
@@ -228,7 +228,7 @@ void parallel_quick_sort(RandomAccessIterator start, RandomAccessIterator end,
   std::swap(*pivot, *(end - 1));
 
   // Recurse.
-  tg.spawn([=, &tg] {
+  tg.spawn([=, &comp, &tg] {
     parallel_quick_sort(start, pivot, comp, tg, depth - 1);
   });
   parallel_quick_sort(pivot + 1, end, comp, tg, depth - 1);