svn commit: r241163 - head/contrib/llvm/tools/clang/lib/Driver

Dimitry Andric dim at FreeBSD.org
Wed Oct 3 16:48:29 UTC 2012


Author: dim
Date: Wed Oct  3 16:48:28 2012
New Revision: 241163
URL: http://svn.freebsd.org/changeset/base/241163

Log:
  Pull in r164717 from upstream clang trunk:
  
    Allow -MF to be used in combination with -E -M or -E -MM.
  
  This should help with building the lang/ghc port.
  
  MFC after:	1 week

Modified:
  head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp

Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
==============================================================================
--- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp	Wed Oct  3 14:28:55 2012	(r241162)
+++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp	Wed Oct  3 16:48:28 2012	(r241163)
@@ -219,11 +219,11 @@ void Clang::AddPreprocessingOptions(Comp
       (A = Args.getLastArg(options::OPT_MMD))) {
     // Determine the output location.
     const char *DepFile;
-    if (Output.getType() == types::TY_Dependencies) {
-      DepFile = Output.getFilename();
-    } else if (Arg *MF = Args.getLastArg(options::OPT_MF)) {
+    if (Arg *MF = Args.getLastArg(options::OPT_MF)) {
       DepFile = MF->getValue(Args);
       C.addFailureResultFile(DepFile);
+    } else if (Output.getType() == types::TY_Dependencies) {
+      DepFile = Output.getFilename();
     } else if (A->getOption().matches(options::OPT_M) ||
                A->getOption().matches(options::OPT_MM)) {
       DepFile = "-";


More information about the svn-src-head mailing list