Add initial dependency file generation support. Patch by Kovarththanan
Rajaratnam, with some updates and formatting changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58122 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index e6c6962..cd58a05 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -1084,6 +1084,16 @@
       return NULL;
     }
     
+    /// FIXME: PP can only handle one callback
+    if (ProgAction != PrintPreprocessedInput) {    
+      const char* ErrStr;
+      bool DFG = CreateDependencyFileGen(PP, OutputFile, InFile, ErrStr);
+       if (!DFG && ErrStr) {
+        fprintf(stderr, ErrStr);
+        return NULL;
+      }
+    }
+
     InitializeSourceMgr = false;
     return PP;
   }