aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/MemoryBuffer.h
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2013-07-23 21:05:21 +0000
committerEli Bendersky <eliben@google.com>2013-07-23 21:05:21 +0000
commit25c6cec2a29f7f835d559865cecb18621a0d61de (patch)
tree5ff25b706386e5e107d064dc72cadeac88b57e94 /include/llvm/Support/MemoryBuffer.h
parentab99d04c59d649ed6d309603b9e77fc1d36cca4d (diff)
downloadexternal_llvm-25c6cec2a29f7f835d559865cecb18621a0d61de.zip
external_llvm-25c6cec2a29f7f835d559865cecb18621a0d61de.tar.gz
external_llvm-25c6cec2a29f7f835d559865cecb18621a0d61de.tar.bz2
Expand the comment on getOpenFileSlice a bit for more details and consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186987 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/MemoryBuffer.h')
-rw-r--r--include/llvm/Support/MemoryBuffer.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Support/MemoryBuffer.h b/include/llvm/Support/MemoryBuffer.h
index 9609e33..4f28da4 100644
--- a/include/llvm/Support/MemoryBuffer.h
+++ b/include/llvm/Support/MemoryBuffer.h
@@ -74,8 +74,9 @@ public:
int64_t FileSize = -1,
bool RequiresNullTerminator = true);
- // Get a MemoryBuffer of part of a file. Since this is in the middle of a
- // file, the buffer is not null terminated.
+ /// Given an already-open file descriptor, map some slice of it into a
+ /// MemoryBuffer. The slice is specified by an \p Offset and \p MapSize.
+ /// Since this is in the middle of a file, the buffer is not null terminated.
static error_code getOpenFileSlice(int FD, const char *Filename,
OwningPtr<MemoryBuffer> &Result,
uint64_t MapSize, int64_t Offset);