diff options
Diffstat (limited to 'clang/lib/Frontend')
| -rw-r--r-- | clang/lib/Frontend/ASTUnit.cpp | 3 | ||||
| -rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 12 | ||||
| -rw-r--r-- | clang/lib/Frontend/DependencyFile.cpp | 3 |
3 files changed, 6 insertions, 12 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index 4f761f4c9bc..983045565f9 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -2591,8 +2591,7 @@ bool ASTUnit::Save(StringRef File) { } if (llvm::sys::fs::rename(TempPath.str(), File)) { - bool exists; - llvm::sys::fs::remove(TempPath.str(), exists); + llvm::sys::fs::remove(TempPath.str()); return true; } diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 48ba0056071..e311465cba1 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -432,8 +432,7 @@ void CompilerInstance::clearOutputFiles(bool EraseFiles) { delete it->OS; if (!it->TempFilename.empty()) { if (EraseFiles) { - bool existed; - llvm::sys::fs::remove(it->TempFilename, existed); + llvm::sys::fs::remove(it->TempFilename); } else { SmallString<128> NewOutFile(it->Filename); @@ -445,8 +444,7 @@ void CompilerInstance::clearOutputFiles(bool EraseFiles) { getDiagnostics().Report(diag::err_unable_to_rename_temp) << it->TempFilename << it->Filename << ec.message(); - bool existed; - llvm::sys::fs::remove(it->TempFilename, existed); + llvm::sys::fs::remove(it->TempFilename); } } } else if (!it->Filename.empty() && EraseFiles) @@ -1091,10 +1089,8 @@ static void pruneModuleCache(const HeaderSearchOptions &HSOpts) { // If we removed all of the files in the directory, remove the directory // itself. - if (RemovedAllFiles) { - bool Existed; - llvm::sys::fs::remove(Dir->path(), Existed); - } + if (RemovedAllFiles) + llvm::sys::fs::remove(Dir->path()); } } diff --git a/clang/lib/Frontend/DependencyFile.cpp b/clang/lib/Frontend/DependencyFile.cpp index 4037af9055d..1e3aba7254c 100644 --- a/clang/lib/Frontend/DependencyFile.cpp +++ b/clang/lib/Frontend/DependencyFile.cpp @@ -166,8 +166,7 @@ static void PrintFilename(raw_ostream &OS, StringRef Filename) { void DependencyFileCallback::OutputDependencyFile() { if (SeenMissingHeader) { - bool existed; - llvm::sys::fs::remove(OutputFile, existed); + llvm::sys::fs::remove(OutputFile); return; } |

