forked from OSchip/llvm-project
COFF: Actually parallelize InputFile::parse().
This is a follow-up patch to r248078. llvm-svn: 248098
This commit is contained in:
parent
e210ee56f2
commit
0652c59506
|
@ -56,8 +56,8 @@ void SymbolTable::readArchives() {
|
||||||
if (ArchiveQueue.empty())
|
if (ArchiveQueue.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::for_each(ArchiveQueue.begin(), ArchiveQueue.end(),
|
parallel_for_each(ArchiveQueue.begin(), ArchiveQueue.end(),
|
||||||
[](ArchiveFile *File) { File->parse(); });
|
[](ArchiveFile *File) { File->parse(); });
|
||||||
|
|
||||||
// Add lazy symbols to the symbol table. Lazy symbols that conflict
|
// Add lazy symbols to the symbol table. Lazy symbols that conflict
|
||||||
// with existing undefined symbols are accumulated in LazySyms.
|
// with existing undefined symbols are accumulated in LazySyms.
|
||||||
|
@ -83,8 +83,8 @@ void SymbolTable::readObjects() {
|
||||||
// Add defined and undefined symbols to the symbol table.
|
// Add defined and undefined symbols to the symbol table.
|
||||||
std::vector<StringRef> Directives;
|
std::vector<StringRef> Directives;
|
||||||
for (size_t I = 0; I < ObjectQueue.size();) {
|
for (size_t I = 0; I < ObjectQueue.size();) {
|
||||||
std::for_each(ObjectQueue.begin() + I, ObjectQueue.end(),
|
parallel_for_each(ObjectQueue.begin() + I, ObjectQueue.end(),
|
||||||
[](InputFile *File) { File->parse(); });
|
[](InputFile *File) { File->parse(); });
|
||||||
for (size_t E = ObjectQueue.size(); I != E; ++I) {
|
for (size_t E = ObjectQueue.size(); I != E; ++I) {
|
||||||
InputFile *File = ObjectQueue[I];
|
InputFile *File = ObjectQueue[I];
|
||||||
if (Config->Verbose)
|
if (Config->Verbose)
|
||||||
|
|
Loading…
Reference in New Issue