diff options
Diffstat (limited to 'flang-rt/lib/runtime/namelist.cpp')
| -rw-r--r-- | flang-rt/lib/runtime/namelist.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/flang-rt/lib/runtime/namelist.cpp b/flang-rt/lib/runtime/namelist.cpp index 44a8fe2de3cc..79dbe4b82292 100644 --- a/flang-rt/lib/runtime/namelist.cpp +++ b/flang-rt/lib/runtime/namelist.cpp @@ -125,11 +125,11 @@ static RT_API_ATTRS bool GetLowerCaseName(IoStatementState &io, char buffer[], return false; } -static RT_API_ATTRS Fortran::common::optional<SubscriptValue> GetSubscriptValue( +static RT_API_ATTRS common::optional<SubscriptValue> GetSubscriptValue( IoStatementState &io) { - Fortran::common::optional<SubscriptValue> value; + common::optional<SubscriptValue> value; std::size_t byteCount{0}; - Fortran::common::optional<char32_t> ch{io.GetCurrentChar(byteCount)}; + common::optional<char32_t> ch{io.GetCurrentChar(byteCount)}; bool negate{ch && *ch == '-'}; if ((ch && *ch == '+') || negate) { io.HandleRelativePosition(byteCount); @@ -146,7 +146,7 @@ static RT_API_ATTRS Fortran::common::optional<SubscriptValue> GetSubscriptValue( if (overflow) { io.GetIoErrorHandler().SignalError( "NAMELIST input subscript value overflow"); - return Fortran::common::nullopt; + return common::nullopt; } if (negate) { if (value) { @@ -168,7 +168,7 @@ static RT_API_ATTRS bool HandleSubscripts(IoStatementState &io, std::size_t contiguousStride{source.ElementBytes()}; bool ok{true}; std::size_t byteCount{0}; - Fortran::common::optional<char32_t> ch{io.GetNextNonBlank(byteCount)}; + common::optional<char32_t> ch{io.GetNextNonBlank(byteCount)}; char32_t comma{GetComma(io)}; for (; ch && *ch != ')'; ++j) { SubscriptValue dimLower{0}, dimUpper{0}, dimStride{0}; @@ -300,9 +300,9 @@ static RT_API_ATTRS bool HandleSubstring( SubscriptValue chars{static_cast<SubscriptValue>(desc.ElementBytes()) / kind}; // Allow for blanks in substring bounds; they're nonstandard, but not // ambiguous within the parentheses. - Fortran::common::optional<SubscriptValue> lower, upper; + common::optional<SubscriptValue> lower, upper; std::size_t byteCount{0}; - Fortran::common::optional<char32_t> ch{io.GetNextNonBlank(byteCount)}; + common::optional<char32_t> ch{io.GetNextNonBlank(byteCount)}; if (ch) { if (*ch == ':') { lower = 1; @@ -364,8 +364,7 @@ static RT_API_ATTRS bool HandleComponent(IoStatementState &io, Descriptor &desc, // If base and component are both arrays, the component name // must be followed by subscripts; process them now. std::size_t byteCount{0}; - if (Fortran::common::optional<char32_t> next{ - io.GetNextNonBlank(byteCount)}; + if (common::optional<char32_t> next{io.GetNextNonBlank(byteCount)}; next && *next == '(') { io.HandleRelativePosition(byteCount); // skip over '(' StaticDescriptor<maxRank, true, 16> staticDesc; @@ -454,7 +453,7 @@ bool IODEF(InputNamelist)(Cookie cookie, const NamelistGroup &group) { RUNTIME_CHECK(handler, listInput != nullptr); // Find this namelist group's header in the input io.BeginReadingRecord(); - Fortran::common::optional<char32_t> next; + common::optional<char32_t> next; char name[nameBufferSize]; RUNTIME_CHECK(handler, group.groupName != nullptr); char32_t comma{GetComma(io)}; |
