[Lldb-commits] [PATCH] [2/2] Fix Path support on Windows

jingham at apple.com jingham at apple.com
Wed Jul 30 19:18:46 PDT 2014


> On Jul 30, 2014, at 6:50 PM, Greg Clayton <gclayton at apple.com> wrote:
> 
> Why does the user ever want to specify the PathSyntax? Shouldn't it just be something that can be queried and be set automagically?
> 
> What if I did:
> 
> FileSpec f("C:\Users\me\foo.txt", false, ePathSyntaxPosix);
> 
> If I set it incorrectly, seems like it might "do the wrong thing" in some calls. It might be nice to use a C++11 typed bitfield to store the PathSyntax to keep the size of the FileSpec class down to as small as possible (uint8_t).
> 

I actually think this is okay.  That path could either be a Unix relative path, or a Windows absolute path.  FileSpec couldn't know which one it was, so if it matters (like if you planned to append to it) you would need to be able to tell the FileSpec constructor what you were making.

Jim




More information about the lldb-commits mailing list