diff options
Diffstat (limited to 'tools/dsymutil')
-rw-r--r-- | tools/dsymutil/DwarfLinker.cpp | 6 | ||||
-rw-r--r-- | tools/dsymutil/dsymutil.cpp | 13 |
2 files changed, 10 insertions, 9 deletions
diff --git a/tools/dsymutil/DwarfLinker.cpp b/tools/dsymutil/DwarfLinker.cpp index 9fb968cb5d25..0fdc690dab4d 100644 --- a/tools/dsymutil/DwarfLinker.cpp +++ b/tools/dsymutil/DwarfLinker.cpp @@ -2366,7 +2366,7 @@ void DwarfLinker::keepDIEAndDependencies(RelocationManager &RelocMgr, continue; } - Val.extractValue(Data, &Offset, &Unit); + Val.extractValue(Data, &Offset, Unit.getFormParams(), &Unit); CompileUnit *ReferencedCU; if (auto RefDie = resolveDIEReference(*this, Units, Val, Unit, Die, ReferencedCU)) { @@ -2965,7 +2965,7 @@ DIE *DwarfLinker::DIECloner::cloneDIE( DWARFFormValue Val(AttrSpec.Form); uint32_t AttrSize = Offset; - Val.extractValue(Data, &Offset, &U); + Val.extractValue(Data, &Offset, U.getFormParams(), &U); AttrSize = Offset - AttrSize; OutOffset += @@ -3158,7 +3158,7 @@ void DwarfLinker::patchLineTableForUnit(CompileUnit &Unit, DWARFDataExtractor LineExtractor( OrigDwarf.getDWARFObj(), OrigDwarf.getDWARFObj().getLineSection(), OrigDwarf.isLittleEndian(), Unit.getOrigUnit().getAddressByteSize()); - LineTable.parse(LineExtractor, &StmtOffset); + LineTable.parse(LineExtractor, &StmtOffset, &Unit.getOrigUnit()); // This vector is the output line table. std::vector<DWARFDebugLine::Row> NewRows; diff --git a/tools/dsymutil/dsymutil.cpp b/tools/dsymutil/dsymutil.cpp index b6d6c909abcf..9d9a24183798 100644 --- a/tools/dsymutil/dsymutil.cpp +++ b/tools/dsymutil/dsymutil.cpp @@ -93,8 +93,8 @@ static list<std::string> ArchFlags( "arch", desc("Link DWARF debug information only for specified CPU architecture\n" "types. This option can be specified multiple times, once for each\n" - "desired architecture. All cpu architectures will be linked by\n" - "default."), + "desired architecture. All CPU architectures will be linked by\n" + "default."), value_desc("arch"), ZeroOrMore, cat(DsymCategory)); static opt<bool> @@ -338,7 +338,6 @@ int main(int argc, char **argv) { NumThreads = 1; NumThreads = std::min<unsigned>(NumThreads, DebugMapPtrsOrErr->size()); - llvm::ThreadPool Threads(NumThreads); // If there is more than one link to execute, we need to generate // temporary files. @@ -366,17 +365,19 @@ int main(int argc, char **argv) { // FIXME: The DwarfLinker can have some very deep recursion that can max // out the (significantly smaller) stack when using threads. We don't // want this limitation when we only have a single thread. - if (NumThreads == 1) + if (NumThreads == 1) { LinkLambda(); - else + } else { + llvm::ThreadPool Threads(NumThreads); Threads.async(LinkLambda); + Threads.wait(); + } if (NeedsTempFiles) TempFiles.emplace_back(Map->getTriple().getArchName().str(), OutputFile); } - Threads.wait(); if (NeedsTempFiles && !MachOUtils::generateUniversalBinary( |