Driver: Unbreak ArgList::hasFlag.

- <rdar://problem/6726511> [driver] clang does not have -msoft-float
   hooked up.

llvm-svn: 68044
This commit is contained in:
Daniel Dunbar 2009-03-30 18:13:26 +00:00
parent 3b636c15e0
commit 13357aef14
2 changed files with 10 additions and 1 deletions

View File

@ -51,7 +51,7 @@ Arg *ArgList::getLastArg(options::ID Id0, options::ID Id1, bool Claim) const {
bool ArgList::hasFlag(options::ID Pos, options::ID Neg, bool Default) const { bool ArgList::hasFlag(options::ID Pos, options::ID Neg, bool Default) const {
Arg *PosA = getLastArg(Pos); Arg *PosA = getLastArg(Pos);
Arg *NegA = getLastArg(Pos); Arg *NegA = getLastArg(Neg);
if (PosA && NegA) if (PosA && NegA)
return NegA->getIndex() < PosA->getIndex(); return NegA->getIndex() < PosA->getIndex();
if (PosA) return true; if (PosA) return true;

View File

@ -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