[llvm] r184219 - Remove uniqueID from PathV1.h.

Rafael Espindola rafael.espindola at gmail.com
Tue Jun 18 12:46:19 PDT 2013


Author: rafael
Date: Tue Jun 18 14:46:19 2013
New Revision: 184219

URL: http://llvm.org/viewvc/llvm-project?rev=184219&view=rev
Log:
Remove uniqueID from PathV1.h.

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=184219&r1=184218&r2=184219&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/PathV1.h (original)
+++ llvm/trunk/include/llvm/Support/PathV1.h Tue Jun 18 14:46:19 2013
@@ -45,19 +45,17 @@ namespace sys {
     uint32_t    mode;       ///< Mode of the file, if applicable
     uint32_t    user;       ///< User ID of owner, if applicable
     uint32_t    group;      ///< Group ID of owner, if applicable
-    uint64_t    uniqueID;   ///< A number to uniquely ID this file
     bool        isDir  : 1; ///< True if this is a directory.
     bool        isFile : 1; ///< True if this is a file.
 
     FileStatus() : fileSize(0), modTime(0,0), mode(0777), user(999),
-                   group(999), uniqueID(0), isDir(false), isFile(false) { }
+                   group(999), isDir(false), isFile(false) { }
 
     TimeValue getTimestamp() const { return modTime; }
     uint64_t getSize() const { return fileSize; }
     uint32_t getMode() const { return mode; }
     uint32_t getUser() const { return user; }
     uint32_t getGroup() const { return group; }
-    uint64_t getUniqueID() const { return uniqueID; }
   };
 
   /// This class provides an abstraction for the path to a file or directory

Modified: llvm/trunk/lib/Support/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=184219&r1=184218&r2=184219&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Path.inc (original)
+++ llvm/trunk/lib/Support/Unix/Path.inc Tue Jun 18 14:46:19 2013
@@ -374,7 +374,6 @@ PathWithStatus::getFileStatus(bool updat
     status.mode = buf.st_mode;
     status.user = buf.st_uid;
     status.group = buf.st_gid;
-    status.uniqueID = uint64_t(buf.st_ino);
     status.isDir  = S_ISDIR(buf.st_mode);
     status.isFile = S_ISREG(buf.st_mode);
     fsIsValid = true;

Modified: llvm/trunk/lib/Support/Windows/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Path.inc?rev=184219&r1=184218&r2=184219&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Path.inc (original)
+++ llvm/trunk/lib/Support/Windows/Path.inc Tue Jun 18 14:46:19 2013
@@ -290,13 +290,6 @@ PathWithStatus::getFileStatus(bool updat
     status.user = 9999;    // Not applicable to Windows, so...
     status.group = 9999;   // Not applicable to Windows, so...
 
-    // FIXME: this is only unique if the file is accessed by the same file path.
-    // How do we do this for C:\dir\file and ..\dir\file ? Unix has inode
-    // numbers, but the concept doesn't exist in Windows.
-    status.uniqueID = 0;
-    for (unsigned i = 0; i < path.length(); ++i)
-      status.uniqueID += path[i];
-
     ULARGE_INTEGER ui;
     ui.LowPart = fi.ftLastWriteTime.dwLowDateTime;
     ui.HighPart = fi.ftLastWriteTime.dwHighDateTime;





More information about the llvm-commits mailing list