summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-10-03 16:48:28 +0000
committerdim <dim@FreeBSD.org>2012-10-03 16:48:28 +0000
commitf8be5cf46440dbdef77249e4612a2cac7c10da4a (patch)
treef8e9fcd227d9ee43364115f40f0c7022e47fa627 /contrib/llvm/tools/clang
parentb7b93e528894509ebb520c28977ed0d37e2f731a (diff)
downloadFreeBSD-src-f8be5cf46440dbdef77249e4612a2cac7c10da4a.zip
FreeBSD-src-f8be5cf46440dbdef77249e4612a2cac7c10da4a.tar.gz
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
Diffstat (limited to 'contrib/llvm/tools/clang')
-rw-r--r--contrib/llvm/tools/clang/lib/Driver/Tools.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
index 88c2eff..936bde9 100644
--- a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
+++ b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
@@ -219,11 +219,11 @@ void Clang::AddPreprocessingOptions(Compilation &C,
(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 = "-";
OpenPOWER on IntegriCloud