[llvm-commits] [llvm] r156591 - in /llvm/trunk: include/llvm/Support/FileSystem.h lib/Support/Unix/PathV2.inc lib/Support/Windows/PathV2.inc

Eric Christopher echristo at apple.com
Tue May 15 16:58:14 PDT 2012


On May 15, 2012, at 4:54 PM, Nick Kledzik <kledzik at apple.com> wrote:

> I thought this FileSystem layer was supposed to abstract away OS details.  But this change puts the Unix permissions model right in the interface.  How is the new 'mode' parameter supposed to be implemented on Windows?
> 

I have no idea. I don't know the windows api here.

> I've been working on linker support and also need to be able to (on Unix) to set the 'x' bit on created files.   But my thinking was to be more abstract.  In my patch, I added a new parameter "bool private_file=true".  When it is set,  on unix the open permissions is 0600, but when false, it is 0644.    I think the unique_file() function was originally meant for just temp files, hence the 0600 permissions.   The other part of my patch is a function to flip on the 'x' bit on any file.

Sure, that works for me as well. :)

-eric



More information about the llvm-commits mailing list