[cfe-dev] [LLVMdev] Unicode path handling on Windows

Aaron Ballman aaron at aaronballman.com
Mon Oct 3 12:27:47 PDT 2011

On Mon, Oct 3, 2011 at 2:24 PM, Bryce Cogswell <bryceco at gmail.com> wrote:
> On Oct 3, 2011, at 11:53 AM, Aaron Ballman wrote:
>> On Mon, Oct 3, 2011 at 1:43 PM, Bryce Cogswell <bryceco at gmail.com> wrote:
>>> However, looking over the FileManager code a little more I'm not even sure
>>> using the path is the best solution, it seems it would be better to use
>>> inode like the unix code does. Windows doesn't support inode (the s_ino
>>> field in stat), but it does have nFileIndexHigh/nFileIndexLow which are
>>> exposed via ::GetFileInformationByHandle and is basically the same thing.
>> One question I would have about that is whether stat actually opens
>> the file under the hood.  GetFileInformationByHandle requires an open
>> file handle, which could be expensive depending on the situation.  I'd
>> worry slightly about a performance hit (networks come to mind).  If
>> the perf is equivalent, then I would agree that nFileIndexHigh/Low
>> will work well as a Win32 version of the inode.
>> ~Aaron
> Our current unix code calls open followed by fstat, so Win32 perf should be similar.

open then fstat would likely be the same as
OpenFile/GetFileInformationByHandle then.  Thanks for the


More information about the cfe-dev mailing list