Remove unused Path::canRead.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 18 Jun 2013 20:42:25 +0000 (20:42 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 18 Jun 2013 20:42:25 +0000 (20:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184229 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/PathV1.h
lib/Support/Unix/Path.inc
lib/Support/Windows/Path.inc

index b38b1b090ed25babe19677cd75deb42d22a6561b..146703c870b6d30be6821338afe7b314493426bc 100644 (file)
@@ -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
index 02f2fb125449e2545896f84c065a3f9f9a7a7d27..658b67460cec5103d68a39e43e0018e294bc9367 100644 (file)
@@ -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);
index 1e453d01ee42d7d93b5cc0f573a5683206882b82..7fe64f68e2fca2b61006b371295b37467420395c 100644 (file)
@@ -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.