diff options
Diffstat (limited to 'lib/Support/Unix')
-rw-r--r-- | lib/Support/Unix/PathV2.inc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Support/Unix/PathV2.inc b/lib/Support/Unix/PathV2.inc index a7007cd697..a5630b9ec9 100644 --- a/lib/Support/Unix/PathV2.inc +++ b/lib/Support/Unix/PathV2.inc @@ -273,8 +273,7 @@ error_code exists(const Twine &path, bool &result) { SmallString<128> path_storage; StringRef p = path.toNullTerminatedStringRef(path_storage); - struct stat status; - if (::stat(p.begin(), &status) == -1) { + if (::access(p.begin(), F_OK) == -1) { if (errno != errc::no_such_file_or_directory) return error_code(errno, system_category()); result = false; |