From 216a3bd70de7f92397371f8d9c8f42683b8ecb19 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 13 Aug 2015 17:57:10 +0000 Subject: [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 --- clang/lib/Frontend/ModuleDependencyCollector.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'clang/lib/Frontend/ModuleDependencyCollector.cpp') 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(); -- cgit v1.2.3