diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2017-11-01 17:15:29 +0000 | 
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2017-11-01 17:15:29 +0000 | 
| commit | 369a7ecc56d3c4ceceefb98fcf898feda34f72f2 (patch) | |
| tree | 3afd85cf521add0966f782a5164ecd39c469d9d7 | |
| parent | a2cdb2d5411477170bbc166bdd0b9adf521a03cf (diff) | |
| download | bcm5719-llvm-369a7ecc56d3c4ceceefb98fcf898feda34f72f2.tar.gz bcm5719-llvm-369a7ecc56d3c4ceceefb98fcf898feda34f72f2.zip  | |
[dsymutil][NFC} Rename thread related command line options
This makes the command line options consistent with llvm-cov and
llvm-profdata, which both use `-num-threads` and `-j`.
This also addresses the conflict reported after landing D39355.
Differential revision: https://reviews.llvm.org/D39496
llvm-svn: 317104
| -rw-r--r-- | llvm/test/tools/dsymutil/cmdline.test | 2 | ||||
| -rw-r--r-- | llvm/tools/dsymutil/dsymutil.cpp | 12 | 
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/test/tools/dsymutil/cmdline.test b/llvm/test/tools/dsymutil/cmdline.test index 959074290f0..dea28cf3d90 100644 --- a/llvm/test/tools/dsymutil/cmdline.test +++ b/llvm/test/tools/dsymutil/cmdline.test @@ -9,10 +9,10 @@ HELP: -flat  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 diff --git a/llvm/tools/dsymutil/dsymutil.cpp b/llvm/tools/dsymutil/dsymutil.cpp index 5f224b6bb8a..ef21677e895 100644 --- a/llvm/tools/dsymutil/dsymutil.cpp +++ b/llvm/tools/dsymutil/dsymutil.cpp @@ -62,12 +62,13 @@ static opt<bool> FlatOut("flat",                           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 @@ int main(int argc, char **argv) {        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);  | 

