From owner-svn-src-all@FreeBSD.ORG Wed Oct 3 16:48:29 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D1AC106564A; Wed, 3 Oct 2012 16:48:29 +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 377928FC08; Wed, 3 Oct 2012 16:48:29 +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 q93GmT8N060388; Wed, 3 Oct 2012 16:48:29 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93GmSET060386; Wed, 3 Oct 2012 16:48:28 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210031648.q93GmSET060386@svn.freebsd.org> From: Dimitry Andric Date: Wed, 3 Oct 2012 16:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241163 - head/contrib/llvm/tools/clang/lib/Driver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 16:48:29 -0000 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 = "-";