[PATCH] D39496: [dsymutil][NFC} Rename thread related command line options
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 1 10:15:58 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL317104: [dsymutil][NFC} Rename thread related command line options (authored by JDevlieghere).
Changed prior to commit:
https://reviews.llvm.org/D39496?vs=121143&id=121146#toc
Repository:
rL LLVM
https://reviews.llvm.org/D39496
Files:
llvm/trunk/test/tools/dsymutil/cmdline.test
llvm/trunk/tools/dsymutil/dsymutil.cpp
Index: llvm/trunk/test/tools/dsymutil/cmdline.test
===================================================================
--- llvm/trunk/test/tools/dsymutil/cmdline.test
+++ llvm/trunk/test/tools/dsymutil/cmdline.test
@@ -9,10 +9,10 @@
HELP: -no-odr
HELP: -no-output
HELP: -no-swiftmodule-timestamp
+HELP: -num-threads=<n>
HELP: -o=<filename>
HELP: -oso-prepend-path=<path>
HELP: -symtab
-HELP: -threads=<n>
HELP: -verbose
HELP: -y
HELP-NOT: -reverse-iterate
Index: llvm/trunk/tools/dsymutil/dsymutil.cpp
===================================================================
--- llvm/trunk/tools/dsymutil/dsymutil.cpp
+++ llvm/trunk/tools/dsymutil/dsymutil.cpp
@@ -62,12 +62,13 @@
init(false), cat(DsymCategory));
static alias FlatOutA("f", desc("Alias for --flat"), aliasopt(FlatOut));
-static opt<unsigned> Threads(
- "threads",
+static opt<unsigned> NumThreads(
+ "num-threads",
desc("Specifies the maximum number (n) of simultaneous threads to use\n"
"when linking multiple architectures."),
value_desc("n"), init(0), cat(DsymCategory));
-static alias ThreadsA("t", desc("Alias for --threads"), aliasopt(Threads));
+static alias NumThreadsA("j", desc("Alias for --num-threads"),
+ aliasopt(NumThreads));
static opt<bool> Verbose("verbose", desc("Verbosity level"), init(false),
cat(DsymCategory));
@@ -324,12 +325,11 @@
exitDsymutil(1);
}
- unsigned NumThreads = Threads;
- if (!NumThreads)
+ if (NumThreads == 0)
NumThreads = llvm::thread::hardware_concurrency();
if (DumpDebugMap || Verbose)
NumThreads = 1;
- NumThreads = std::min(NumThreads, (unsigned)DebugMapPtrsOrErr->size());
+ NumThreads = std::min<unsigned>(NumThreads, DebugMapPtrsOrErr->size());
llvm::ThreadPool Threads(NumThreads);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39496.121146.patch
Type: text/x-patch
Size: 1869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171101/5a1ff994/attachment.bin>
More information about the llvm-commits
mailing list