diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-02-08 22:40:47 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-02-08 22:40:47 +0000 |
commit | b4cc031a3e1306fea74c9211d50c5cde6d9a8cd5 (patch) | |
tree | 80f2d7365cd402e9040ed85abf3b06a17d59f423 /include/llvm/Support/MemoryBuffer.h | |
parent | 971b83b67a9812556cdb97bb58aa96fb37af458d (diff) |
Don't open the file again in the gold plugin. To be able to do this, update
MemoryBuffer::getOpenFile to not close the file descriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125128 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/MemoryBuffer.h')
-rw-r--r-- | include/llvm/Support/MemoryBuffer.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/llvm/Support/MemoryBuffer.h b/include/llvm/Support/MemoryBuffer.h index fa1942341b..b6243b7b10 100644 --- a/include/llvm/Support/MemoryBuffer.h +++ b/include/llvm/Support/MemoryBuffer.h @@ -69,8 +69,7 @@ public: int64_t FileSize = -1); /// getOpenFile - Given an already-open file descriptor, read the file and - /// return a MemoryBuffer. This takes ownership of the descriptor, - /// immediately closing it after reading the file. + /// return a MemoryBuffer. static error_code getOpenFile(int FD, const char *Filename, OwningPtr<MemoryBuffer> &result, int64_t FileSize = -1); |