summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix/Program.inc
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-01-10 02:34:23 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-01-10 02:34:23 +0000
commit58df2e00b244b172ee6902d301607b94783579cf (patch)
treed2c572d69668db747b45c0a3c652f369fea397f6 /llvm/lib/Support/Unix/Program.inc
parentf6efe58d4585e7fd0b20bac44c3bc027502da121 (diff)
downloadbcm5719-llvm-58df2e00b244b172ee6902d301607b94783579cf.tar.gz
bcm5719-llvm-58df2e00b244b172ee6902d301607b94783579cf.zip
Support/Path: Deprecate PathV1::exists and replace all uses with PathV2::fs::exists.
llvm-svn: 123151
Diffstat (limited to 'llvm/lib/Support/Unix/Program.inc')
-rw-r--r--llvm/lib/Support/Unix/Program.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Support/Unix/Program.inc b/llvm/lib/Support/Unix/Program.inc
index 17c3ba14bc2..1104bc7503e 100644
--- a/llvm/lib/Support/Unix/Program.inc
+++ b/llvm/lib/Support/Unix/Program.inc
@@ -17,6 +17,7 @@
//===----------------------------------------------------------------------===//
#include <llvm/Config/config.h>
+#include "llvm/Support/FileSystem.h"
#include "Unix.h"
#if HAVE_SYS_STAT_H
#include <sys/stat.h>
@@ -355,7 +356,8 @@ Program::Wait(const sys::Path &path,
// Following the POSIX convention for command-line tools (which posix_spawn
// itself apparently does not), check to see if the failure was due to some
// reason other than the file not existing, and return 126 in this case.
- if (result == 127 && path.exists())
+ bool Exists;
+ if (result == 127 && !llvm::sys::fs::exists(path.str(), Exists) && Exists)
result = 126;
#endif
if (result == 127) {
OpenPOWER on IntegriCloud