Fix lli with no arguments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3226 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-08-02 21:51:29 +00:00
parent 8fd217cb29
commit b490c20b38
2 changed files with 2 additions and 2 deletions

View File

@ -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++]);

View File

@ -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++]);