Skip to content

Commit e1a8b76

Browse files
committed
Updates
1 parent fff8055 commit e1a8b76

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bolt/lib/Rewrite/DWARFRewriter.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ static cl::opt<bool> KeepARanges(
329329
"keep or generate .debug_aranges section if .gdb_index is written"),
330330
cl::Hidden, cl::cat(BoltCategory));
331331

332-
static cl::opt<int>
332+
static cl::opt<unsigned>
333333
DebugThreadCount("debug-thread-count",
334334
cl::desc("specifies thread count for the multithreading "
335335
"for updating DWO debug info"),
@@ -725,8 +725,11 @@ void DWARFRewriter::updateDebugInfo() {
725725
for (std::vector<DWARFUnit *> &Vec : PartVec) {
726726
DIEBlder.buildCompileUnits(Vec);
727727
llvm::SmallVector<std::unique_ptr<DIEBuilder>, 72> DWODIEBuildersByCU;
728+
const int ThreadCount = (opts::DebugThreadCount < opts::ThreadCount)
729+
? opts::DebugThreadCount
730+
: opts::ThreadCount;
728731
ThreadPoolInterface &ThreadPool =
729-
ParallelUtilities::getThreadPool(opts::DebugThreadCount);
732+
ParallelUtilities::getThreadPool(ThreadCount);
730733
for (DWARFUnit *CU : DIEBlder.getProcessedCUs()) {
731734
createRangeLocListAddressWriters(*CU);
732735
std::optional<DWARFUnit *> SplitCU;

0 commit comments

Comments
 (0)