From owner-svn-src-stable@FreeBSD.ORG Wed Oct 10 19:07:57 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C4A9301; Wed, 10 Oct 2012 19:07:57 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04F538FC08; Wed, 10 Oct 2012 19:07:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9AJ7ulY083717; Wed, 10 Oct 2012 19:07:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9AJ7uJB083715; Wed, 10 Oct 2012 19:07:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210101907.q9AJ7uJB083715@svn.freebsd.org> From: Dimitry Andric Date: Wed, 10 Oct 2012 19:07:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241407 - stable/9/contrib/llvm/tools/clang/lib/Driver X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Oct 2012 19:07:57 -0000 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 = "-";