llvm.org GIT mirror llvm / b3a0758
Remove the IsVolatileSize parameter of getOpenFileSlice. getOpenFileSlice gets passed the map size, so it makes no sense to say that the size is volatile. The code will not even compute the size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219226 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 5 years ago
2 changed file(s) with 4 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
7777 /// Given an already-open file descriptor, map some slice of it into a
7878 /// MemoryBuffer. The slice is specified by an \p Offset and \p MapSize.
7979 /// Since this is in the middle of a file, the buffer is not null terminated.
80 ///
81 /// \param IsVolatileSize Set to true to indicate that the file size may be
82 /// changing, e.g. when libclang tries to parse while the user is
83 /// editing/updating the file.
8480 static ErrorOr>
8581 getOpenFileSlice(int FD, const Twine &Filename, uint64_t MapSize,
86 int64_t Offset, bool IsVolatileSize = false);
82 int64_t Offset);
8783
8884 /// Given an already-open file descriptor, read the file and return a
8985 /// MemoryBuffer.
405405
406406 ErrorOr>
407407 MemoryBuffer::getOpenFileSlice(int FD, const Twine &Filename, uint64_t MapSize,
408 int64_t Offset, bool IsVolatileSize) {
408 int64_t Offset) {
409 assert(MapSize != uint64_t(-1));
409410 return getOpenFileImpl(FD, Filename, -1, MapSize, Offset, false,
410 IsVolatileSize);
411 /*IsVolatileSize*/ false);
411412 }
412413
413414 ErrorOr> MemoryBuffer::getSTDIN() {