diff options
author | Chris Lattner <sabre@nondot.org> | 2005-08-08 21:57:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-08-08 21:57:27 +0000 |
commit | d09a9a788bb22b176dee11fc400a8a375bb128be (patch) | |
tree | a74e3db4ded2127a13da9ab63efd970abd0b9ae9 /llvm/lib/Support/CommandLine.cpp | |
parent | 64068eb7da52c29884c35e646a80dea5ce1d3656 (diff) | |
download | bcm5719-llvm-d09a9a788bb22b176dee11fc400a8a375bb128be.tar.gz bcm5719-llvm-d09a9a788bb22b176dee11fc400a8a375bb128be.zip |
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!
llvm-svn: 22717
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 09038d3a5f3..b53706f1684 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/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 |