From: Rafael Espindola Date: Tue, 18 Jun 2013 20:42:25 +0000 (+0000) Subject: Remove unused Path::canRead. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f3426a482ea24c399df7c4abaa1ff8f7a9d9dfc8;p=oota-llvm.git Remove unused Path::canRead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184229 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/PathV1.h b/include/llvm/Support/PathV1.h index b38b1b090ed..146703c870b 100644 --- a/include/llvm/Support/PathV1.h +++ b/include/llvm/Support/PathV1.h @@ -267,15 +267,6 @@ namespace sys { LLVM_ATTRIBUTE_DEPRECATED(bool isSymLink() const, LLVM_PATH_DEPRECATED_MSG(fs::is_symlink)); - /// This function determines if the path name references a readable file - /// or directory in the file system. This function checks for - /// the existence and readability (by the current program) of the file - /// or directory. - /// @returns true if the pathname references a readable file. - /// @brief Determines if the path is a readable file or directory - /// in the file system. - bool canRead() const; - /// This function determines if the path name references a writable file /// or directory in the file system. This function checks for the /// existence and writability (by the current program) of the file or diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc index 02f2fb12544..658b67460ce 100644 --- a/lib/Support/Unix/Path.inc +++ b/lib/Support/Unix/Path.inc @@ -325,11 +325,6 @@ Path::isSymLink() const { } -bool -Path::canRead() const { - return 0 == access(path.c_str(), R_OK); -} - bool Path::canWrite() const { return 0 == access(path.c_str(), W_OK); diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc index 1e453d01ee4..7fe64f68e2f 100644 --- a/lib/Support/Windows/Path.inc +++ b/lib/Support/Windows/Path.inc @@ -243,13 +243,6 @@ Path::isSymLink() const { return attributes & FILE_ATTRIBUTE_REPARSE_POINT; } -bool -Path::canRead() const { - // FIXME: take security attributes into account. - DWORD attr = GetFileAttributes(path.c_str()); - return attr != INVALID_FILE_ATTRIBUTES; -} - bool Path::canWrite() const { // FIXME: take security attributes into account.