[Support] Fix lifetime of file descriptors when using MemoryBuffer.
authorMichael J. Spencer <bigcheesegs@gmail.com>
Thu, 14 Mar 2013 00:20:10 +0000 (00:20 +0000)
committerMichael J. Spencer <bigcheesegs@gmail.com>
Thu, 14 Mar 2013 00:20:10 +0000 (00:20 +0000)
commitcc3a595ab938352f3acf8652c5858ddf879524a5
tree1f67c816387fd6a44ecf54063cc9c283b06642a3
parent64a0a33307723957bf2f15e3181a290853c6f833
[Support] Fix lifetime of file descriptors when using MemoryBuffer.

Clients of MemoryBuffer::getOpenFile expect it not to take ownership of the file
descriptor passed in. So don't.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176995 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/FileSystem.h
lib/Support/FileOutputBuffer.cpp
lib/Support/MemoryBuffer.cpp
lib/Support/Unix/PathV2.inc
lib/Support/Windows/PathV2.inc