aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/DependencyFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend/DependencyFile.cpp')
-rw-r--r--lib/Frontend/DependencyFile.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Frontend/DependencyFile.cpp b/lib/Frontend/DependencyFile.cpp
index 628def68e5e0..4037af9055d5 100644
--- a/lib/Frontend/DependencyFile.cpp
+++ b/lib/Frontend/DependencyFile.cpp
@@ -21,6 +21,7 @@
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/StringSet.h"
+#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
@@ -165,7 +166,8 @@ static void PrintFilename(raw_ostream &OS, StringRef Filename) {
void DependencyFileCallback::OutputDependencyFile() {
if (SeenMissingHeader) {
- llvm::sys::Path(OutputFile).eraseFromDisk();
+ bool existed;
+ llvm::sys::fs::remove(OutputFile, existed);
return;
}