[Modules] Emit the module file paths as dependencies of the PCH when we are building one.

This is because the PCH is tied to the module files, if one of the module files changes or gets removed
the build system should re-build the PCH file.

rdar://16321245

llvm-svn: 203885
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 72f781d..73f8aa8 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -295,6 +295,9 @@
     if (A->getOption().matches(options::OPT_M) ||
         A->getOption().matches(options::OPT_MD))
       CmdArgs.push_back("-sys-header-deps");
+
+    if (isa<PrecompileJobAction>(JA))
+      CmdArgs.push_back("-module-file-deps");
   }
 
   if (Args.hasArg(options::OPT_MG)) {