[PATCH] D40024: Fix skipping of flags in getClangStripDependencyFileAdjuster
Dave Lee via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 14 06:09:37 PST 2017
kastiglione updated this revision to Diff 122829.
kastiglione added a comment.
Add a continue;
https://reviews.llvm.org/D40024
Files:
lib/Tooling/ArgumentsAdjusters.cpp
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;
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40024.122829.patch
Type: text/x-patch
Size: 889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171114/8691c28a/attachment.bin>
More information about the cfe-commits
mailing list