~FileRemover() {
if (DeleteIt) {
// Ignore problems deleting the file.
- bool existed;
- sys::fs::remove(Filename.str(), existed);
+ sys::fs::remove(Filename.str());
}
}
void setFile(const Twine& filename, bool deleteIt = true) {
if (DeleteIt) {
// Ignore problems deleting the file.
- bool existed;
- sys::fs::remove(Filename.str(), existed);
+ sys::fs::remove(Filename.str());
}
Filename.clear();
}
FileOutputBuffer::~FileOutputBuffer() {
- bool Existed;
- sys::fs::remove(Twine(TempPath), Existed);
+ sys::fs::remove(Twine(TempPath));
}
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;
errs() << "Error: " << ErrMsg << "\n";
return false;
}
- bool Existed;
- sys::fs::remove(Filename, Existed);
+ sys::fs::remove(Filename);
errs() << " done. \n";
}
else {
// 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;
}
}
// 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;
}
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() {
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.