[llvm] r184229 - Remove unused Path::canRead.

Rafael Espindola rafael.espindola at gmail.com
Tue Jun 18 13:42:25 PDT 2013


Author: rafael
Date: Tue Jun 18 15:42:25 2013
New Revision: 184229

URL: http://llvm.org/viewvc/llvm-project?rev=184229&view=rev
Log:
Remove unused Path::canRead.

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

Modified: llvm/trunk/include/llvm/Support/PathV1.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PathV1.h?rev=184229&r1=184228&r2=184229&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/PathV1.h (original)
+++ llvm/trunk/include/llvm/Support/PathV1.h Tue Jun 18 15:42:25 2013
@@ -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

Modified: llvm/trunk/lib/Support/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=184229&r1=184228&r2=184229&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Path.inc (original)
+++ llvm/trunk/lib/Support/Unix/Path.inc Tue Jun 18 15:42:25 2013
@@ -326,11 +326,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);
 }

Modified: llvm/trunk/lib/Support/Windows/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Path.inc?rev=184229&r1=184228&r2=184229&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Path.inc (original)
+++ llvm/trunk/lib/Support/Windows/Path.inc Tue Jun 18 15:42:25 2013
@@ -244,13 +244,6 @@ Path::isSymLink() const {
 }
 
 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.
   DWORD attr = GetFileAttributes(path.c_str());





More information about the llvm-commits mailing list