summaryrefslogtreecommitdiff
path: root/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
commit65dcf1d8f850f345b736e7ec7c3bfe9899a9ee10 (patch)
tree4932547d8b93ff2d2e5790c04ffb5d83d729a850 /lib/Frontend/ModuleDependencyCollector.cpp
parent1e1a99ea87f52cf6a14f5fa08a44451a45ddd2ac (diff)
downloadclang-65dcf1d8f850f345b736e7ec7c3bfe9899a9ee10.tar.gz
[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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ModuleDependencyCollector.cpp')
-rw-r--r--lib/Frontend/ModuleDependencyCollector.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Frontend/ModuleDependencyCollector.cpp b/lib/Frontend/ModuleDependencyCollector.cpp
index 67852dc020..78bb0279d9 100644
--- a/lib/Frontend/ModuleDependencyCollector.cpp
+++ b/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();