Skip to content

Commit fe7209d

Browse files
committed
Fix formatting
1 parent 76670d2 commit fe7209d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

llvm/lib/Support/Unix/Path.inc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,17 +1024,17 @@ std::error_code openFile(const Twine &Name, int &ResultFD,
10241024
auto Open = [&]() { return ::open(P.begin(), OpenFlags, Mode); };
10251025
if ((ResultFD = sys::RetryAfterSignal(-1, Open)) < 0)
10261026
return errnoAsErrorCode();
1027-
// The underlying operation on these platforms allow opening directories
1028-
// for reading in more cases than other platforms.
1029-
#if defined(__MVS__) || defined(_AIX)
1030-
if (Access == FA_Read) {
1031-
struct stat Status;
1032-
if (fstat(ResultFD, &Status) == -1)
1033-
return errnoAsErrorCode();
1034-
if (S_ISDIR(Status.st_mode))
1035-
return make_error_code(errc::is_a_directory);
1036-
}
1037-
#endif
1027+
// The underlying operation on these platforms allow opening directories
1028+
// for reading in more cases than other platforms.
1029+
#if defined(__MVS__) || defined(_AIX)
1030+
if (Access == FA_Read) {
1031+
struct stat Status;
1032+
if (fstat(ResultFD, &Status) == -1)
1033+
return errnoAsErrorCode();
1034+
if (S_ISDIR(Status.st_mode))
1035+
return make_error_code(errc::is_a_directory);
1036+
}
1037+
#endif
10381038
#ifndef O_CLOEXEC
10391039
if (!(Flags & OF_ChildInherit)) {
10401040
int r = fcntl(ResultFD, F_SETFD, FD_CLOEXEC);

0 commit comments

Comments
 (0)