summaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-08 21:57:27 +0000
committerChris Lattner <sabre@nondot.org>2005-08-08 21:57:27 +0000
commit21e1a79a31fe45fcd861d64118a60c1fcfad618a (patch)
tree44eaf038a6927358d1f5b0262f6ff4069e8071e7 /lib/Support
parent0045776d33d6d9d1033235025e67cda4b83b6987 (diff)
downloadllvm-21e1a79a31fe45fcd861d64118a60c1fcfad618a.tar.gz
llvm-21e1a79a31fe45fcd861d64118a60c1fcfad618a.tar.bz2
llvm-21e1a79a31fe45fcd861d64118a60c1fcfad618a.tar.xz
Allow tools with "consume after" options (like lli) to take more positional
opts than they take directly. Thanks to John C for pointing this problem out to me! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/CommandLine.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 09038d3a5f..b53706f168 100644
--- a/lib/Support/CommandLine.cpp
+++ b/lib/Support/CommandLine.cpp
@@ -335,11 +335,8 @@ void cl::ParseCommandLineOptions(int &argc, char **argv,
" does not require a value!");
}
UnboundedFound |= EatsUnboundedNumberOfValues(Opt);
-
- if (Opt->getNumOccurrencesFlag() == cl::ZeroOrMore
- || Opt->getNumOccurrencesFlag() == cl::OneOrMore)
- HasUnlimitedPositionals = true;
}
+ HasUnlimitedPositionals = UnboundedFound || ConsumeAfterOpt;
}
// PositionalVals - A vector of "positional" arguments we accumulate into