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/Serialization/GlobalModuleIndex.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/Serialization/GlobalModuleIndex.cpp')
| -rw-r--r-- | lib/Serialization/GlobalModuleIndex.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Serialization/GlobalModuleIndex.cpp b/lib/Serialization/GlobalModuleIndex.cpp index fb647b0be9..fcdf5f5a8d 100644 --- a/lib/Serialization/GlobalModuleIndex.cpp +++ b/lib/Serialization/GlobalModuleIndex.cpp @@ -807,13 +807,12 @@ GlobalModuleIndex::writeIndex(FileManager &FileMgr, StringRef Path) { return EC_IOError; // Remove the old index file. It isn't relevant any more. - bool OldIndexExisted; - llvm::sys::fs::remove(IndexPath.str(), OldIndexExisted); + llvm::sys::fs::remove(IndexPath.str()); // Rename the newly-written index file to the proper name. if (llvm::sys::fs::rename(IndexTmpPath.str(), IndexPath.str())) { // Rename failed; just remove the - llvm::sys::fs::remove(IndexTmpPath.str(), OldIndexExisted); + llvm::sys::fs::remove(IndexTmpPath.str()); return EC_IOError; } |
