Lines Matching refs:ResultFD
985 std::error_code openFile(const Twine &Name, int &ResultFD,
995 if ((ResultFD = sys::RetryAfterSignal(-1, Open)) < 0)
999 int r = fcntl(ResultFD, F_SETFD, FD_CLOEXEC);
1059 if ((Flags & OF_Append) && lseek(ResultFD, 0, SEEK_END) == -1)
1062 if (fstat(ResultFD, &Stat) == -1)
1069 if (auto EC = llvm::enableAutoConversion(ResultFD))
1072 if (auto EC = llvm::setFileTag(ResultFD, CCSID_IBM_1047, true))
1076 if (auto EC = llvm::disableAutoConversion(ResultFD))
1079 if (auto EC = llvm::setFileTag(ResultFD, FT_BINARY, false))
1100 std::error_code openFileForRead(const Twine &Name, int &ResultFD,
1104 openFile(Name, ResultFD, CD_OpenExisting, FA_Read, Flags, 0666);
1116 if (::fcntl(ResultFD, F_GETPATH, Buffer) != -1)
1122 snprintf(ProcPath, sizeof(ProcPath), "/proc/self/fd/%d", ResultFD);
1140 file_t ResultFD;
1141 std::error_code EC = openFileForRead(Name, ResultFD, Flags, RealPath);
1144 return ResultFD;