summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/ModuleDependencyCollector.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-08-13 17:57:10 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-08-13 17:57:10 +0000
commit216a3bd70de7f92397371f8d9c8f42683b8ecb19 (patch)
tree8c5e9d33b56b36a8209d5e71e95a06648ad13595 /clang/lib/Frontend/ModuleDependencyCollector.cpp
parent6cf4a6ba9b3fb7d0b2eab26c35146b5ab3c3c8be (diff)
downloadbcm5719-llvm-216a3bd70de7f92397371f8d9c8f42683b8ecb19.tar.gz
bcm5719-llvm-216a3bd70de7f92397371f8d9c8f42683b8ecb19.zip
[modules] Change the way we deal with .d output for explicitly-specified module
files: include the .pcm file itself in the .d output, rather than including its own input files. Other forms of module file continue to be transparent for .d output. Arguably, the input files for the .pcm file are still inputs to the compilation, but that's unnecessary for make-like build systems (where the mtime of the .pcm file is sufficient) and harmful for smarter build systems that know about module files and want to track only the local dependencies. llvm-svn: 244923
Diffstat (limited to 'clang/lib/Frontend/ModuleDependencyCollector.cpp')
-rw-r--r--clang/lib/Frontend/ModuleDependencyCollector.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Frontend/ModuleDependencyCollector.cpp b/clang/lib/Frontend/ModuleDependencyCollector.cpp
index 67852dc0203..78bb0279d90 100644
--- a/clang/lib/Frontend/ModuleDependencyCollector.cpp
+++ b/clang/lib/Frontend/ModuleDependencyCollector.cpp
@@ -32,8 +32,8 @@ public:
: Collector(Collector) {}
bool needsInputFileVisitation() override { return true; }
bool needsSystemInputFileVisitation() override { return true; }
- bool visitInputFile(StringRef Filename, bool IsSystem,
- bool IsOverridden) override;
+ bool visitInputFile(StringRef Filename, bool IsSystem, bool IsOverridden,
+ bool IsExplicitModule) override;
};
}
@@ -85,7 +85,8 @@ std::error_code ModuleDependencyListener::copyToRoot(StringRef Src) {
}
bool ModuleDependencyListener::visitInputFile(StringRef Filename, bool IsSystem,
- bool IsOverridden) {
+ bool IsOverridden,
+ bool IsExplicitModule) {
if (Collector.insertSeen(Filename))
if (copyToRoot(Filename))
Collector.setHasErrors();
OpenPOWER on IntegriCloud