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 | ef7a206359ccfcda0ae72410266d97be2e3c172d (patch) | |
tree | 0f100aa2a28d071032c60f3a62411f8603284cf1 /tools | |
parent | 2a4a9564d6807cdb5434d20fe5460869cb9aa088 (diff) | |
download | llvm-ef7a206359ccfcda0ae72410266d97be2e3c172d.tar.gz |
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/dsymutil/dsymutil.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/dsymutil/dsymutil.cpp b/tools/dsymutil/dsymutil.cpp index 5f224b6bb8a1..ef21677e895c 100644 --- a/tools/dsymutil/dsymutil.cpp +++ b/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); |