svn commit: r241407 - stable/9/contrib/llvm/tools/clang/lib/Driver

Dimitry Andric dim at FreeBSD.org
Wed Oct 10 19:07:57 UTC 2012


Author: dim
Date: Wed Oct 10 19:07:56 2012
New Revision: 241407
URL: http://svn.freebsd.org/changeset/base/241407

Log:
  MFC r241163:
  
  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.

Modified:
  stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
Directory Properties:
  stable/9/contrib/llvm/   (props changed)
  stable/9/contrib/llvm/tools/clang/   (props changed)

Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
==============================================================================
--- stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp	Wed Oct 10 19:06:11 2012	(r241406)
+++ stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp	Wed Oct 10 19:07:56 2012	(r241407)
@@ -217,11 +217,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-stable-9 mailing list