[cfe-commits] r68044 - in /cfe/trunk: lib/Driver/ArgList.cpp test/Driver/flags.c
Daniel Dunbar
daniel at zuster.org
Mon Mar 30 11:13:27 PDT 2009
Author: ddunbar
Date: Mon Mar 30 13:13:26 2009
New Revision: 68044
URL: http://llvm.org/viewvc/llvm-project?rev=68044&view=rev
Log:
Driver: Unbreak ArgList::hasFlag.
- <rdar://problem/6726511> [driver] clang does not have -msoft-float
hooked up.
Added:
cfe/trunk/test/Driver/flags.c
Modified:
cfe/trunk/lib/Driver/ArgList.cpp
Modified: cfe/trunk/lib/Driver/ArgList.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ArgList.cpp?rev=68044&r1=68043&r2=68044&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ArgList.cpp (original)
+++ cfe/trunk/lib/Driver/ArgList.cpp Mon Mar 30 13:13:26 2009
@@ -51,7 +51,7 @@
bool ArgList::hasFlag(options::ID Pos, options::ID Neg, bool Default) const {
Arg *PosA = getLastArg(Pos);
- Arg *NegA = getLastArg(Pos);
+ Arg *NegA = getLastArg(Neg);
if (PosA && NegA)
return NegA->getIndex() < PosA->getIndex();
if (PosA) return true;
Added: cfe/trunk/test/Driver/flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/flags.c?rev=68044&view=auto
==============================================================================
--- cfe/trunk/test/Driver/flags.c (added)
+++ cfe/trunk/test/Driver/flags.c Mon Mar 30 13:13:26 2009
@@ -0,0 +1,9 @@
+// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S -msoft-float %s 2> %t.log &&
+// RUN: grep '"--soft-float"' %t.log &&
+
+// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S -msoft-float -mno-soft-float %s 2> %t.log &&
+// RUN: grep '"--soft-float"' %t.log | count 0 &&
+
+// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S -mno-soft-float %s -msoft-float 2> %t.log &&
+// RUN: grep '"--soft-float"' %t.log
+
More information about the cfe-commits
mailing list