From ce314dc2501662cbd1c78a4aa21ffb5f8d8958a8 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 10 Jan 2014 21:32:14 +0000 Subject: 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 --- lib/Serialization/GlobalModuleIndex.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/Serialization/GlobalModuleIndex.cpp') 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; } -- cgit v1.2.3