diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-12 08:44:47 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-12 08:44:47 +0000 |
commit | a948045b43e9f102533f85a1b64ddd26c0077e8a (patch) | |
tree | 409955eb56929b5d3b6dfa1c4217e70876303d36 /lib/Driver/OptTable.cpp | |
parent | 53ec55215075c8f4ddd47ca6ed7d382f16beb670 (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.cpp | 4 |
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) { |