diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-10 21:32:14 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-10 21:32:14 +0000 |
| commit | ce314dc2501662cbd1c78a4aa21ffb5f8d8958a8 (patch) | |
| tree | d2ee14a44f0e5d89fb1e9894a5db8bab0ce3cd92 /lib/Frontend/CompilerInstance.cpp | |
| parent | 0cd538ad753b7f45ab26bab062e5c279cd0556e7 (diff) | |
| download | clang-ce314dc2501662cbd1c78a4aa21ffb5f8d8958a8.tar.gz clang-ce314dc2501662cbd1c78a4aa21ffb5f8d8958a8.tar.bz2 clang-ce314dc2501662cbd1c78a4aa21ffb5f8d8958a8.tar.xz | |
Use the simpler version of llvm::sys::fs::remove when possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
| -rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index 48ba005607..e311465cba 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/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()); } } |
