aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/OptTable.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-12 08:44:47 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-12 08:44:47 +0000
commita948045b43e9f102533f85a1b64ddd26c0077e8a (patch)
tree409955eb56929b5d3b6dfa1c4217e70876303d36 /lib/Driver/OptTable.cpp
parent53ec55215075c8f4ddd47ca6ed7d382f16beb670 (diff)
Driver: '-' is parsed as an input.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/OptTable.cpp')
-rw-r--r--lib/Driver/OptTable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Driver/OptTable.cpp b/lib/Driver/OptTable.cpp
index 00a949f086..b2d14ca27f 100644
--- a/lib/Driver/OptTable.cpp
+++ b/lib/Driver/OptTable.cpp
@@ -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) {