[flang] [llvm] [flang] implement `split` for fortran 2023 (PR #161484)
Connector Switch via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 1 21:24:37 PDT 2025
================
@@ -570,6 +570,30 @@ static RT_API_ATTRS void MaxMin(Descriptor &accumulator, const Descriptor &x,
}
}
+template <typename CHAR>
+inline RT_API_ATTRS std::size_t Split(const CHAR *x, std::size_t xLen,
+ const CHAR *set, std::size_t setLen, std::size_t pos, bool back) {
----------------
c8ef wrote:
Thank you for the review! I have added the runtime check for `pos` as specified in the standard.
BTW, I have kept the `pos`'s type as size_t. If a negative value is passed, it will wrap up to a large unsigned value and still be functional under the current check. If a signed type is preferred, I can make that change.
https://github.com/llvm/llvm-project/pull/161484
More information about the llvm-commits
mailing list