Lines Matching refs:FD
210 MemoryBufferMMapFile(bool RequiresNullTerminator, int FD, uint64_t Len, in MemoryBufferMMapFile() argument
212 : MFR(FD, sys::fs::mapped_file_region::readonly, in MemoryBufferMMapFile()
236 getMemoryBufferForStream(int FD, const Twine &BufferName) { in getMemoryBufferForStream() argument
243 ReadBytes = read(FD, Buffer.end(), ChunkSize); in getMemoryBufferForStream()
263 getOpenFileImpl(int FD, const Twine &Filename, uint64_t FileSize,
270 int FD; in getFileAux() local
271 std::error_code EC = sys::fs::openFileForRead(Filename, FD); in getFileAux()
276 getOpenFileImpl(FD, Filename, FileSize, MapSize, Offset, in getFileAux()
278 close(FD); in getFileAux()
282 static bool shouldUseMmap(int FD, in shouldUseMmap() argument
310 if (sys::fs::status(FD, Status)) in shouldUseMmap()
339 getOpenFileImpl(int FD, const Twine &Filename, uint64_t FileSize, in getOpenFileImpl() argument
350 std::error_code EC = sys::fs::status(FD, Status); in getOpenFileImpl()
360 return getMemoryBufferForStream(FD, Filename); in getOpenFileImpl()
367 if (shouldUseMmap(FD, FileSize, MapSize, Offset, RequiresNullTerminator, in getOpenFileImpl()
372 MemoryBufferMMapFile(RequiresNullTerminator, FD, MapSize, Offset, EC)); in getOpenFileImpl()
389 if (lseek(FD, Offset, SEEK_SET) == -1) in getOpenFileImpl()
395 ssize_t NumRead = ::pread(FD, BufPtr, BytesLeft, MapSize-BytesLeft+Offset); in getOpenFileImpl()
397 ssize_t NumRead = ::read(FD, BufPtr, BytesLeft); in getOpenFileImpl()
417 MemoryBuffer::getOpenFile(int FD, const Twine &Filename, uint64_t FileSize, in getOpenFile() argument
419 return getOpenFileImpl(FD, Filename, FileSize, FileSize, 0, in getOpenFile()
424 MemoryBuffer::getOpenFileSlice(int FD, const Twine &Filename, uint64_t MapSize, in getOpenFileSlice() argument
427 return getOpenFileImpl(FD, Filename, -1, MapSize, Offset, false, in getOpenFileSlice()