summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-01-30 01:24:31 +0000
committerMatthias Braun <matze@braunis.de>2016-01-30 01:24:31 +0000
commitb30f2f51410449a6d476fed5c486a4ef8fd5f912 (patch)
treeaf58fd7a768c6b601eaf890020aa3e2b4a3130b6 /llvm/lib/Support/CommandLine.cpp
parentdaa812d518b1f49feddeb08fcc9c5e563b0bf11e (diff)
downloadbcm5719-llvm-b30f2f51410449a6d476fed5c486a4ef8fd5f912.tar.gz
bcm5719-llvm-b30f2f51410449a6d476fed5c486a4ef8fd5f912.zip
Avoid overly large SmallPtrSet/SmallSet
These sets perform linear searching in small mode so it is never a good idea to use SmallSize/N bigger than 32. llvm-svn: 259283
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index fdcdb03706d..c1615a0a683 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -1449,7 +1449,7 @@ static int OptNameCompare(const std::pair<const char *, Option *> *LHS,
static void sortOpts(StringMap<Option *> &OptMap,
SmallVectorImpl<std::pair<const char *, Option *>> &Opts,
bool ShowHidden) {
- SmallPtrSet<Option *, 128> OptionSet; // Duplicate option detection.
+ SmallPtrSet<Option *, 32> OptionSet; // Duplicate option detection.
for (StringMap<Option *>::iterator I = OptMap.begin(), E = OptMap.end();
I != E; ++I) {
OpenPOWER on IntegriCloud