From b490c20b3891717f95804517d47d269bbcf3dc03 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 2 Aug 2002 21:51:29 +0000 Subject: [PATCH] Fix lli with no arguments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3226 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/CommandLine.cpp | 2 +- support/lib/Support/CommandLine.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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++]);