[PATCH] D86999: getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl driver

2020-09-08 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG2168dbf4cc76: getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl… (authored by shivanshu3,

[PATCH] D86999: getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl driver

2020-09-03 Thread Shivanshu Goyal via Phabricator via cfe-commits
shivanshu3 marked an inline comment as done. shivanshu3 added a comment. Note that I do not have commit access and this change will have to be committed by someone else on my behalf. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86999/new/

[PATCH] D86999: getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl driver

2020-09-03 Thread Shivanshu Goyal via Phabricator via cfe-commits
shivanshu3 marked 2 inline comments as done. shivanshu3 added inline comments. Comment at: clang/lib/Tooling/ArgumentsAdjusters.cpp:117 + // do not remove those when using the cl driver. + bool IsDependencyFileArg; + if (Arg.startswith("/showIncludes") ||

[PATCH] D86999: getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl driver

2020-09-03 Thread Shivanshu Goyal via Phabricator via cfe-commits
shivanshu3 updated this revision to Diff 289793. shivanshu3 added a comment. - Remove the bool `IsDependencyFileArg` in the implementation of `getClangStripDependencyFileAdjuster()` to make it simpler. - Add an extra argument after -MT in the test case to ensure we do not strip arguments after

[PATCH] D86999: getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl driver

2020-09-03 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/lib/Tooling/ArgumentsAdjusters.cpp:117 + // do not remove those when using the cl driver. + bool IsDependencyFileArg; + if (Arg.startswith("/showIncludes") || Arg.startswith("-showIncludes"))

[PATCH] D86999: getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl driver

2020-09-02 Thread Shivanshu Goyal via Phabricator via cfe-commits
shivanshu3 marked 5 inline comments as done. shivanshu3 added inline comments. Comment at: clang/lib/Tooling/ArgumentsAdjusters.cpp:117 + // do not remove those when using the cl driver. + bool IsDependencyFileArg; + if (Arg.startswith("/showIncludes") ||

[PATCH] D86999: getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl driver

2020-09-02 Thread Shivanshu Goyal via Phabricator via cfe-commits
shivanshu3 updated this revision to Diff 289606. shivanshu3 added a comment. - Simplified the implementation of `getDriverMode` and got rid of the `Optional` return type. - When using the cl driver mode, we do not want to skip the next argument for -MF, -MT, -MQ. Repository: rG LLVM Github

[PATCH] D86999: getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl driver

2020-09-02 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Seems reasonable to me. Just some nits. Comment at: clang/lib/Tooling/ArgumentsAdjusters.cpp:29 + auto EqualSignIndex = ArgRef.find('='); + return StringRef(ArgRef.data() + EqualSignIndex + 1); +} Instead of manually

[PATCH] D86999: getClangStripDependencyFileAdjuster(): Do not remove -M args when using MSVC cl driver

2020-09-01 Thread Shivanshu Goyal via Phabricator via cfe-commits
shivanshu3 created this revision. shivanshu3 added reviewers: aeubanks, kadircet. Herald added a project: clang. Herald added a subscriber: cfe-commits. shivanshu3 requested review of this revision. Herald added a subscriber: ormris. MSVC's cl.exe has a few command line arguments which start with