mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Use getFileStatus instead of Path::isDirectory().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29443 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#if HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
#endif
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -30,7 +31,7 @@ bool StackTraceRequested = false;
|
||||
void (*InterruptFunction)() = 0;
|
||||
|
||||
std::vector<std::string> *FilesToRemove = 0 ;
|
||||
std::vector<llvm::sys::Path> *DirectoriesToRemove = 0;
|
||||
std::vector<sys::Path> *DirectoriesToRemove = 0;
|
||||
|
||||
// IntSigs - Signals that may interrupt the program at any time.
|
||||
const int IntSigs[] = {
|
||||
@@ -146,7 +147,6 @@ void RegisterHandler(int Signal) {
|
||||
|
||||
}
|
||||
|
||||
namespace llvm {
|
||||
|
||||
void sys::SetInterruptFunction(void (*IF)()) {
|
||||
InterruptFunction = IF;
|
||||
@@ -165,8 +165,10 @@ void sys::RemoveFileOnSignal(const sys::Path &Filename) {
|
||||
}
|
||||
|
||||
// RemoveDirectoryOnSignal - The public API
|
||||
void sys::RemoveDirectoryOnSignal(const llvm::sys::Path& path) {
|
||||
if (!path.isDirectory())
|
||||
void sys::RemoveDirectoryOnSignal(const sys::Path& path) {
|
||||
// Not a directory?
|
||||
sys::FileStatus Status;
|
||||
if (path.getFileStatus(Status) || !Status.isDir)
|
||||
return;
|
||||
|
||||
if (DirectoriesToRemove == 0)
|
||||
@@ -184,6 +186,3 @@ void sys::PrintStackTraceOnErrorSignal() {
|
||||
StackTraceRequested = true;
|
||||
std::for_each(KillSigs, KillSigsEnd, RegisterHandler);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user