From a948045b43e9f102533f85a1b64ddd26c0077e8a Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Thu, 12 Mar 2009 08:44:47 +0000 Subject: Driver: '-' is parsed as an input. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66784 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/OptTable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Driver/OptTable.cpp') 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) { -- cgit v1.2.3-18-g5258