From d09a9a788bb22b176dee11fc400a8a375bb128be Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 8 Aug 2005 21:57:27 +0000 Subject: 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 --- llvm/lib/Support/CommandLine.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'llvm/lib') 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 -- cgit v1.2.3