mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-11 13:37:07 +00:00
Reapply r183985 now that the missing check was added to PathV2.
llvm-svn: 184120
This commit is contained in:
parent
81867d6723
commit
344b614949
@ -12,7 +12,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Support/ToolOutputFile.h"
|
||||
#include "llvm/Support/PathV1.h"
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/Signals.h"
|
||||
using namespace llvm;
|
||||
|
||||
@ -25,8 +25,10 @@ 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 != "-")
|
||||
sys::Path(Filename).eraseFromDisk();
|
||||
if (!Keep && Filename != "-") {
|
||||
bool Existed;
|
||||
sys::fs::remove(Filename, Existed);
|
||||
}
|
||||
|
||||
// Ok, the file is successfully written and closed, or deleted. There's no
|
||||
// further need to clean it up on signals.
|
||||
|
Loading…
Reference in New Issue
Block a user