Fix lli with no arguments

llvm-svn: 3226
This commit is contained in:
Chris Lattner 2002-08-02 21:51:29 +00:00
parent c840f0ec2a
commit 86b1459fdb
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++]);