summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
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
commitd09a9a788bb22b176dee11fc400a8a375bb128be (patch)
treea74e3db4ded2127a13da9ab63efd970abd0b9ae9 /llvm/lib/Support/CommandLine.cpp
parent64068eb7da52c29884c35e646a80dea5ce1d3656 (diff)
downloadbcm5719-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.cpp5
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
OpenPOWER on IntegriCloud