19 tool_output_file::CleanupInstaller::CleanupInstaller(
const char *
filename)
20 : Filename(filename), Keep(
false) {
26 tool_output_file::CleanupInstaller::~CleanupInstaller() {
28 if (!Keep && Filename !=
"-") {
41 : Installer(filename), OS(filename, ErrorInfo, Flags) {
43 if (!ErrorInfo.empty())
44 Installer.Keep =
true;
48 : Installer(Filename), OS(FD,
true) {
void DontRemoveFileOnSignal(StringRef Filename)
bool RemoveFileOnSignal(StringRef Filename, std::string *ErrMsg=0)
Remove a file if a fatal signal occurs.
error_code remove(const Twine &path, bool &existed)
Remove path. Equivalent to POSIX remove().
const StringRef filename(StringRef path)
Get filename.