Driver: '-' is parsed as an input.

llvm-svn: 66784
This commit is contained in:
Daniel Dunbar 2009-03-12 08:44:47 +00:00
parent 1688f1a7e0
commit d971762d5a
1 changed files with 2 additions and 2 deletions

View File

@ -124,8 +124,8 @@ Arg *OptTable::ParseOneArg(const ArgList &Args, unsigned &Index,
unsigned IndexEnd) const {
const char *Str = Args.getArgString(Index);
// Anything that doesn't start with '-' is an input.
if (Str[0] != '-')
// Anything that doesn't start with '-' is an input, as is '-' itself.
if (Str[0] != '-' || Str[1] == '\0')
return new PositionalArg(getOption(OPT_INPUT), Index++);
for (unsigned j = OPT_UNKNOWN + 1; j < LastOption; ++j) {