summaryrefslogtreecommitdiff
path: root/lld/ELF/Relocations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Relocations.cpp')
-rw-r--r--lld/ELF/Relocations.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index 6f2280b678b4..bda979c3066a 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -1534,16 +1534,13 @@ template <class ELFT> void elf::scanRelocations() {
scanner.template scanSection<ELFT>(*s);
}
};
- if (serial)
- fn();
- else
- tg.execute(fn);
+ tg.spawn(fn, serial);
}
// Both the main thread and thread pool index 0 use getThreadIndex()==0. Be
// careful that they don't concurrently run scanSections. When serial is
// true, fn() has finished at this point, so running execute is safe.
- tg.execute([] {
+ tg.spawn([] {
RelocationScanner scanner;
for (Partition &part : partitions) {
for (EhInputSection *sec : part.ehFrame->sections)