aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Frontend/DependencyFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend/DependencyFile.cpp')
-rw-r--r--lib/Frontend/DependencyFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Frontend/DependencyFile.cpp b/lib/Frontend/DependencyFile.cpp
index bc5a55df0860..5c3a23128a14 100644
--- a/lib/Frontend/DependencyFile.cpp
+++ b/lib/Frontend/DependencyFile.cpp
@@ -171,7 +171,7 @@ void DependencyFileCallback::OutputDependencyFile() {
*OS << '\n';
// Create phony targets if requested.
- if (PhonyTarget) {
+ if (PhonyTarget && !Files.empty()) {
// Skip the first entry, this is always the input file itself.
for (std::vector<std::string>::iterator I = Files.begin() + 1,
E = Files.end(); I != E; ++I) {