assert(ToFromMappings.empty());
if (!outputDir.empty()) {
std::string infoFile = getRemapInfoFile(outputDir);
- bool existed;
- llvm::sys::fs::remove(infoFile, existed);
+ llvm::sys::fs::remove(infoFile);
}
}
}
if (llvm::sys::fs::rename(TempPath.str(), File)) {
- bool exists;
- llvm::sys::fs::remove(TempPath.str(), exists);
+ llvm::sys::fs::remove(TempPath.str());
return true;
}
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);
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)
// 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());
}
}
void DependencyFileCallback::OutputDependencyFile() {
if (SeenMissingHeader) {
- bool existed;
- llvm::sys::fs::remove(OutputFile, existed);
+ llvm::sys::fs::remove(OutputFile);
return;
}
AllWritten = false;
Diagnostics.Report(clang::diag::err_unable_to_rename_temp)
<< TempFilename << Filename << ec.message();
- bool existed;
// If the remove fails, there's not a lot we can do - this is already an
// error.
- llvm::sys::fs::remove(TempFilename.str(), existed);
+ llvm::sys::fs::remove(TempFilename.str());
}
}
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;
}