mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 11:33:24 +02:00
Revert "Remove a use of PathV1.h."
This reverts commit r183985. We were missing the checks for not deleting things like /dev/null. llvm-svn: 184111
This commit is contained in:
parent
95d3811592
commit
8a9592657a
@ -12,7 +12,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Support/ToolOutputFile.h"
|
#include "llvm/Support/ToolOutputFile.h"
|
||||||
#include "llvm/Support/FileSystem.h"
|
#include "llvm/Support/PathV1.h"
|
||||||
#include "llvm/Support/Signals.h"
|
#include "llvm/Support/Signals.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
@ -25,10 +25,8 @@ tool_output_file::CleanupInstaller::CleanupInstaller(const char *filename)
|
|||||||
|
|
||||||
tool_output_file::CleanupInstaller::~CleanupInstaller() {
|
tool_output_file::CleanupInstaller::~CleanupInstaller() {
|
||||||
// Delete the file if the client hasn't told us not to.
|
// Delete the file if the client hasn't told us not to.
|
||||||
if (!Keep && Filename != "-") {
|
if (!Keep && Filename != "-")
|
||||||
bool Existed;
|
sys::Path(Filename).eraseFromDisk();
|
||||||
sys::fs::remove(Filename, Existed);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ok, the file is successfully written and closed, or deleted. There's no
|
// Ok, the file is successfully written and closed, or deleted. There's no
|
||||||
// further need to clean it up on signals.
|
// further need to clean it up on signals.
|
||||||
|
Loading…
Reference in New Issue
Block a user