Index: lib/Tooling/ArgumentsAdjusters.cpp =================================================================== --- lib/Tooling/ArgumentsAdjusters.cpp +++ lib/Tooling/ArgumentsAdjusters.cpp @@ -58,14 +58,14 @@ StringRef Arg = Args[i]; // All dependency-file options begin with -M. These include -MM, // -MF, -MG, -MP, -MT, -MQ, -MD, and -MMD. - if (!Arg.startswith("-M")) + if (!Arg.startswith("-M")) { AdjustedArgs.push_back(Args[i]); + continue; + } - if ((Arg == "-MF") || (Arg == "-MT") || (Arg == "-MQ") || - (Arg == "-MD") || (Arg == "-MMD")) { - // Output is specified as -MX foo. Skip the next argument also. + if (Arg == "-MF" || Arg == "-MT" || Arg == "-MQ") + // These flags take an argument: -MX foo. Skip the next argument also. ++i; - } } return AdjustedArgs; };