[modules] Don't leak -M flags for dependency file generation into the module
build process when we implicitly build a module. Previously, we'd create the
specified .d file once for each implicitly-built module and then finally
overwrite it with the correct contents after the requested build completes.
(This fails if you use stdout as a dependency file, which is what the provided
testcase does, and is how I discovered this brokenness.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244412
91177308-0d34-0410-b5e6-
96231b3b80d8