From: Chris Lattner Date: Fri, 2 Aug 2002 21:51:29 +0000 (+0000) Subject: Fix lli with no arguments X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=b490c20b3891717f95804517d47d269bbcf3dc03;p=oota-llvm.git Fix lli with no arguments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3226 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 9890ee2414f..39bff48fd73 100644 --- a/lib/Support/CommandLine.cpp +++ b/lib/Support/CommandLine.cpp @@ -375,7 +375,7 @@ void cl::ParseCommandLineOptions(int &argc, char **argv, // positional option and keep the rest for the consume after. The above // loop would have assigned no values to positional options in this case. // - if (PositionalOpts.size() == 2 && ValNo == 0) + if (PositionalOpts.size() == 2 && ValNo == 0 && !PositionalVals.empty()) ErrorParsing |= ProvidePositionalOption(PositionalOpts[1], PositionalVals[ValNo++]); diff --git a/support/lib/Support/CommandLine.cpp b/support/lib/Support/CommandLine.cpp index 9890ee2414f..39bff48fd73 100644 --- a/support/lib/Support/CommandLine.cpp +++ b/support/lib/Support/CommandLine.cpp @@ -375,7 +375,7 @@ void cl::ParseCommandLineOptions(int &argc, char **argv, // positional option and keep the rest for the consume after. The above // loop would have assigned no values to positional options in this case. // - if (PositionalOpts.size() == 2 && ValNo == 0) + if (PositionalOpts.size() == 2 && ValNo == 0 && !PositionalVals.empty()) ErrorParsing |= ProvidePositionalOption(PositionalOpts[1], PositionalVals[ValNo++]);