aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-08-09 02:44:20 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-08-09 02:44:20 +0000
commit2d7fbbc7be6c78370d2d7cc37fe7a8277ac0ff10 (patch)
treefabe45888153f28c32b23543797fbda7857322b6 /clang/lib/Frontend/CompilerInstance.cpp
parent03f7e611c625de0b5509ee975ca01ff95525a7b6 (diff)
downloadllvm-2d7fbbc7be6c78370d2d7cc37fe7a8277ac0ff10.zip
llvm-2d7fbbc7be6c78370d2d7cc37fe7a8277ac0ff10.tar.gz
llvm-2d7fbbc7be6c78370d2d7cc37fe7a8277ac0ff10.tar.bz2
[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.) llvm-svn: 244412
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 4e7b08a..5133ffc 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -944,8 +944,10 @@ static bool compileModuleImpl(CompilerInstance &ImportingInstance,
FullSourceLoc(ImportLoc, ImportingInstance.getSourceManager()));
// If we're collecting module dependencies, we need to share a collector
- // between all of the module CompilerInstances.
+ // between all of the module CompilerInstances. Other than that, we don't
+ // want to produce any dependency output from the module build.
Instance.setModuleDepCollector(ImportingInstance.getModuleDepCollector());
+ Invocation->getDependencyOutputOpts() = DependencyOutputOptions();
// Get or create the module map that we'll use to build this module.
std::string InferredModuleMapContent;