[llvm] r175549 - Whitelist files and block devices instead of blacklisting fifos and

Anna Zaks ganna at apple.com
Tue Feb 19 14:16:34 PST 2013


Dan,

Looks like this is breaking our internal MSVC builder:
3>..\..\..\lib\Support\MemoryBuffer.cpp(328) : error C3861: 'S_ISREG': identifier not found
3>..\..\..\lib\Support\MemoryBuffer.cpp(328) : error C3861: 'S_ISBLK': identifier not found
Anna.
On Feb 19, 2013, at 11:36 AM, Dan Gohman <dan433584 at gmail.com> wrote:

> Author: djg
> Date: Tue Feb 19 13:36:55 2013
> New Revision: 175549
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=175549&view=rev
> Log:
> Whitelist files and block devices instead of blacklisting fifos and
> character devices.
> 
> Modified:
>    llvm/trunk/lib/Support/MemoryBuffer.cpp
> 
> Modified: llvm/trunk/lib/Support/MemoryBuffer.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/MemoryBuffer.cpp?rev=175549&r1=175548&r2=175549&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Support/MemoryBuffer.cpp (original)
> +++ llvm/trunk/lib/Support/MemoryBuffer.cpp Tue Feb 19 13:36:55 2013
> @@ -322,9 +322,10 @@ error_code MemoryBuffer::getOpenFile(int
>         return error_code(errno, posix_category());
>       }
> 
> -      // If this is a named pipe or character device, we can't trust the size.
> -      // Create the memory buffer by copying off the stream.
> -      if (S_ISFIFO(FileInfo.st_mode) || S_ISCHR(FileInfo.st_mode)) {
> +      // If this not a file or a block device (e.g. it's a named pipe
> +      // or character device), we can't trust the size. Create the memory
> +      // buffer by copying off the stream.
> +      if (!S_ISREG(FileInfo.st_mode) && !S_ISBLK(FileInfo.st_mode)) {
>         return getMemoryBufferForStream(FD, Filename, result);
>       }
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130219/a3a89504/attachment.html>


More information about the llvm-commits mailing list