summaryrefslogtreecommitdiffstats
path: root/lld/ELF/OutputSections.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-12-03 21:24:51 +0000
committerRui Ueyama <ruiu@google.com>2016-12-03 21:24:51 +0000
commit244a435ae3ee07ad55576d78b5f5173616d15838 (patch)
tree6fa68e7b821e4f2fc18602e57e199425e9d04762 /lld/ELF/OutputSections.cpp
parent30545b9058824ffcfb14234d299a5f179a5feef7 (diff)
downloadbcm5719-llvm-244a435ae3ee07ad55576d78b5f5173616d15838.tar.gz
bcm5719-llvm-244a435ae3ee07ad55576d78b5f5173616d15838.zip
Factor out common code to a header.
llvm-svn: 288599
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r--lld/ELF/OutputSections.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp
index 4a723d5667d..cfb8ac9c568 100644
--- a/lld/ELF/OutputSections.cpp
+++ b/lld/ELF/OutputSections.cpp
@@ -16,7 +16,7 @@
#include "SymbolTable.h"
#include "SyntheticSections.h"
#include "Target.h"
-#include "lld/Core/Parallel.h"
+#include "Threads.h"
#include "llvm/Support/Dwarf.h"
#include "llvm/Support/MD5.h"
#include "llvm/Support/MathExtras.h"
@@ -254,10 +254,7 @@ template <class ELFT> void OutputSection<ELFT>::writeTo(uint8_t *Buf) {
fill(Buf, this->Size, Filler);
auto Fn = [=](InputSection<ELFT> *IS) { IS->writeTo(Buf); };
- if (Config->Threads)
- parallel_for_each(Sections.begin(), Sections.end(), Fn);
- else
- std::for_each(Sections.begin(), Sections.end(), Fn);
+ forEach(Sections.begin(), Sections.end(), Fn);
// Linker scripts may have BYTE()-family commands with which you
// can write arbitrary bytes to the output. Process them if any.
OpenPOWER on IntegriCloud