diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Support/FileOutputBuffer.cpp | 6 | ||||
-rw-r--r-- | lib/Support/GraphWriter.cpp | 3 | ||||
-rw-r--r-- | lib/Support/LockFileManager.cpp | 13 | ||||
-rw-r--r-- | lib/Support/ToolOutputFile.cpp | 6 |
4 files changed, 10 insertions, 18 deletions
diff --git a/lib/Support/FileOutputBuffer.cpp b/lib/Support/FileOutputBuffer.cpp index ed084faed7..c01778f960 100644 --- a/lib/Support/FileOutputBuffer.cpp +++ b/lib/Support/FileOutputBuffer.cpp @@ -28,8 +28,7 @@ FileOutputBuffer::FileOutputBuffer(mapped_file_region * R, } FileOutputBuffer::~FileOutputBuffer() { - bool Existed; - sys::fs::remove(Twine(TempPath), Existed); + sys::fs::remove(Twine(TempPath)); } error_code FileOutputBuffer::create(StringRef FilePath, @@ -57,8 +56,7 @@ error_code FileOutputBuffer::create(StringRef FilePath, } // Delete target file. - bool Existed; - EC = sys::fs::remove(FilePath, Existed); + EC = sys::fs::remove(FilePath); if (EC) return EC; diff --git a/lib/Support/GraphWriter.cpp b/lib/Support/GraphWriter.cpp index 85be415dce..83aa25507f 100644 --- a/lib/Support/GraphWriter.cpp +++ b/lib/Support/GraphWriter.cpp @@ -87,8 +87,7 @@ ExecGraphViewer(StringRef ExecPath, std::vector<const char*> &args, errs() << "Error: " << ErrMsg << "\n"; return false; } - bool Existed; - sys::fs::remove(Filename, Existed); + sys::fs::remove(Filename); errs() << " done. \n"; } else { diff --git a/lib/Support/LockFileManager.cpp b/lib/Support/LockFileManager.cpp index eeec274ad8..5f153a9f79 100644 --- a/lib/Support/LockFileManager.cpp +++ b/lib/Support/LockFileManager.cpp @@ -111,8 +111,7 @@ LockFileManager::LockFileManager(StringRef FileName) // We failed to write out PID, so make up an excuse, remove the // unique lock file, and fail. Error = make_error_code(errc::no_space_on_device); - bool Existed; - sys::fs::remove(UniqueLockFileName.c_str(), Existed); + sys::fs::remove(UniqueLockFileName.c_str()); return; } } @@ -137,14 +136,13 @@ LockFileManager::LockFileManager(StringRef FileName) // Someone else managed to create the lock file first. Wipe out our unique // lock file (it's useless now) and read the process ID from the lock file. - bool Existed; - sys::fs::remove(UniqueLockFileName.str(), Existed); + sys::fs::remove(UniqueLockFileName.str()); if ((Owner = readLockFile(LockFileName))) return; // There is a lock file that nobody owns; try to clean it up and report // an error. - sys::fs::remove(LockFileName.str(), Existed); + sys::fs::remove(LockFileName.str()); Error = EC; } @@ -163,9 +161,8 @@ LockFileManager::~LockFileManager() { return; // Since we own the lock, remove the lock file and our own unique lock file. - bool Existed; - sys::fs::remove(LockFileName.str(), Existed); - sys::fs::remove(UniqueLockFileName.str(), Existed); + sys::fs::remove(LockFileName.str()); + sys::fs::remove(UniqueLockFileName.str()); } void LockFileManager::waitForUnlock() { diff --git a/lib/Support/ToolOutputFile.cpp b/lib/Support/ToolOutputFile.cpp index 5c1268a40a..b5fb20f4b2 100644 --- a/lib/Support/ToolOutputFile.cpp +++ b/lib/Support/ToolOutputFile.cpp @@ -25,10 +25,8 @@ tool_output_file::CleanupInstaller::CleanupInstaller(const char *filename) tool_output_file::CleanupInstaller::~CleanupInstaller() { // Delete the file if the client hasn't told us not to. - if (!Keep && Filename != "-") { - bool Existed; - sys::fs::remove(Filename, Existed); - } + if (!Keep && Filename != "-") + sys::fs::remove(Filename); // Ok, the file is successfully written and closed, or deleted. There's no // further need to clean it up on signals. |