diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Driver/Driver.cpp | 5 | ||||
-rw-r--r-- | lib/Driver/Tools.cpp | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 98c1a21559..a3b7167c8b 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -800,8 +800,7 @@ void Driver::BuildActions(const ToolChain &TC, const ArgList &Args, // -{E,M,MM} only run the preprocessor. if ((FinalPhaseArg = Args.getLastArg(options::OPT_E)) || - (FinalPhaseArg = Args.getLastArg(options::OPT_M)) || - (FinalPhaseArg = Args.getLastArg(options::OPT_MM))) { + (FinalPhaseArg = Args.getLastArg(options::OPT_M, options::OPT_MM))) { FinalPhase = phases::Preprocess; // -{fsyntax-only,-analyze,emit-ast,S} only run up to the compiler. @@ -909,7 +908,7 @@ Action *Driver::ConstructPhaseAction(const ArgList &Args, phases::ID Phase, case phases::Preprocess: { types::ID OutputTy; // -{M, MM} alter the output type. - if (Args.hasArg(options::OPT_M) || Args.hasArg(options::OPT_MM)) { + if (Args.hasArg(options::OPT_M, options::OPT_MM)) { OutputTy = types::TY_Dependencies; } else { OutputTy = types::getPreprocessedType(Input->getType()); diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index e4f807e59e..7674fdcf38 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -136,8 +136,7 @@ void Clang::AddPreprocessingOptions(const Driver &D, Args.AddLastArg(CmdArgs, options::OPT_CC); // Handle dependency file generation. - if ((A = Args.getLastArg(options::OPT_M)) || - (A = Args.getLastArg(options::OPT_MM)) || + if ((A = Args.getLastArg(options::OPT_M, options::OPT_MM)) || (A = Args.getLastArg(options::OPT_MD)) || (A = Args.getLastArg(options::OPT_MMD))) { // Determine the output location. |