[llvm] r184217 - Add a GetUniqueID that will replace the uniqueID of PathV1.h.

Aaron Ballman aaron at aaronballman.com
Wed Jun 19 13:37:46 PDT 2013


On Wed, Jun 19, 2013 at 2:56 PM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
>> You can use GetFileInformationByHandle (on an opened file handle) to
>> get this -- the volume serial number plus nFileIndexHigh and Low
>> uniquely identify the file on a machine.  Note that this identifier
>> isn't unique over time (the file system can reuse the ids), so
>> hopefully you don't need this for long periods of time.
>
> Patch to improve the windows handling are very welcome, but for the
> first patch I just wanted to move from sys::Path with exactly the
> semantics we had before.

Ask and you shall receive.  ;-)

I chose to friend GetUniqueID instead of replicate the logic from
status, which hopefully is not too problematic.  Also, I added unit
tests for this, since it appears to be entirely untested (aside from
usage).

~Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fs.patch
Type: application/octet-stream
Size: 3390 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130619/7baa0899/attachment.obj>


More information about the llvm-commits mailing list