[cfe-commits] r68042 - in /cfe/trunk: lib/Driver/Tools.cpp test/Frontend/dependency-gen.c
Daniel Dunbar
daniel at zuster.org
Mon Mar 30 10:59:59 PDT 2009
Author: ddunbar
Date: Mon Mar 30 12:59:58 2009
New Revision: 68042
URL: http://llvm.org/viewvc/llvm-project?rev=68042&view=rev
Log:
Fix -MD with no -MT when -o is specified (and fix test case).
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Frontend/dependency-gen.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=68042&r1=68041&r2=68042&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Mar 30 12:59:58 2009
@@ -246,7 +246,7 @@
// when we are only generating a dependency file.
Arg *OutputOpt = Args.getLastArg(options::OPT_o);
if (OutputOpt && Output.getType() != types::TY_Dependencies) {
- DepTarget = A->getValue(Args);
+ DepTarget = OutputOpt->getValue(Args);
} else {
// Otherwise derive from the base input.
//
Modified: cfe/trunk/test/Frontend/dependency-gen.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/dependency-gen.c?rev=68042&r1=68041&r2=68042&view=diff
==============================================================================
--- cfe/trunk/test/Frontend/dependency-gen.c (original)
+++ cfe/trunk/test/Frontend/dependency-gen.c Mon Mar 30 12:59:58 2009
@@ -1,6 +1,6 @@
// rdar://6533411
// RUN: clang -MD -MF %t.d -c -x c -o %t.o /dev/null &&
-// RUN: grep '.*dependency-gen.c.out.tmp.o:' %t.d
+// RUN: grep '.*dependency-gen.c.out.tmp.o:' %t.d &&
// RUN: grep '/dev/null' %t.d &&
// RUN: clang -M -x c /dev/null -o %t.deps &&
More information about the cfe-commits
mailing list