[Driver] Fix multiple bugs related to dependency file options: -M -MM -MD -MMD -MT -MQ
authorFangrui Song <maskray@google.com>
Sat, 14 Sep 2019 06:01:22 +0000 (06:01 +0000)
committerFangrui Song <maskray@google.com>
Sat, 14 Sep 2019 06:01:22 +0000 (06:01 +0000)
commit55abd2b2956f91e3f69b375b22ab0f848e08aa20
tree92667f526247759c1cc22f3a8741ee8bd6b01853
parent6fe3d36768bc9323906a4a367371f98e0558a0a1
[Driver] Fix multiple bugs related to dependency file options: -M -MM -MD -MMD -MT -MQ

-M -o test.i => dependency file is test.d, not test.i
-MM -o test.i => dependency file is test.d, not test.i
-M -MMD => bogus warning -Wunused-command-line-argument
-M MT dummy => -w not rendered

llvm-svn: 371918
clang/lib/Driver/Driver.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/m-and-mm.c