Lines Matching refs:FD
223 int FD = ::open(Filename, OpenFlags);
224 if (FD == -1)
227 error_code ret = getOpenFile(FD, Filename, result, FileSize, FileSize,
229 close(FD);
233 static bool shouldUseMmap(int FD,
255 if (fstat(FD, &FileInfo) == -1) {
276 error_code MemoryBuffer::getOpenFile(int FD, const char *Filename,
290 if (fstat(FD, &FileInfo) == -1) {
298 if (shouldUseMmap(FD, FileSize, MapSize, Offset, RequiresNullTerminator,
304 if (const char *Pages = sys::Path::MapInFilePages(FD,
324 if (lseek(FD, Offset, SEEK_SET) == -1)
328 ssize_t NumRead = ::read(FD, BufPtr, BytesLeft);