Changes in directory llvm/lib/System/Win32:

Path.inc updated: 1.60 -> 1.61
---
Log message:

Add a uniqueID field to the FileStatus structure for Paths. This will map
to the inode number on Unix and something far less unique on Windows. The
windows case needs to be improved.


---
Diffs of the changes:  (+7 -0)

 Path.inc |    7 +++++++
 1 files changed, 7 insertions(+)


Index: llvm/lib/System/Win32/Path.inc
diff -u llvm/lib/System/Win32/Path.inc:1.60 llvm/lib/System/Win32/Path.inc:1.61
--- llvm/lib/System/Win32/Path.inc:1.60 Thu Mar 29 11:43:20 2007
+++ llvm/lib/System/Win32/Path.inc      Thu Mar 29 12:00:31 2007
@@ -319,6 +319,13 @@
     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];
+
     __int64 ft = *reinterpret_cast<__int64*>(&fi.ftLastWriteTime);
     status->modTime.fromWin32Time(ft);
 



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to