Skip to content

Commit 84725db

Browse files
klauslervar-const
authored andcommitted
[flang][runtime] Fix CUDA flang-rt build breakage (llvm#135220)
I used "std::nullopt" instead of the correct "Fortran::common::nullopt" in a recent patch, and you can get away with that only for CPU builds. Fix.
1 parent df00507 commit 84725db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flang-rt/include/flang-rt/runtime/io-stmt.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class IoStatementState {
156156
if (at_ && at_ < limit_) {
157157
return *at_;
158158
} else {
159-
return std::nullopt;
159+
return Fortran::common::nullopt;
160160
}
161161
}
162162
RT_API_ATTRS void NextRecord(IoStatementState &io) {
@@ -200,7 +200,7 @@ class IoStatementState {
200200
byteCount = ch ? 1 : 0;
201201
return ch;
202202
} else if (!field->MustUseSlowPath()) {
203-
return std::nullopt;
203+
return Fortran::common::nullopt;
204204
}
205205
}
206206
return GetCurrentCharSlow(byteCount);

0 commit comments

Comments
 (0)