From 54453f2978c76b3aa71be7bb4e9657c8539f8648 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Mon, 10 Jan 2011 02:34:23 +0000 Subject: Support/Path: Deprecate PathV1::exists and replace all uses with PathV2::fs::exists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123151 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Unix/Program.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/Support/Unix/Program.inc') diff --git a/lib/Support/Unix/Program.inc b/lib/Support/Unix/Program.inc index 17c3ba14bc..1104bc7503 100644 --- a/lib/Support/Unix/Program.inc +++ b/lib/Support/Unix/Program.inc @@ -17,6 +17,7 @@ //===----------------------------------------------------------------------===// #include +#include "llvm/Support/FileSystem.h" #include "Unix.h" #if HAVE_SYS_STAT_H #include @@ -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) { -- cgit v1.2.3-18-g5258