[llvm] [flang-rt] Use runtime::memchr instead of std::memchr. (PR #135298)
Slava Zakharin via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 10 19:02:37 PDT 2025
https://github.com/vzakhari created https://github.com/llvm/llvm-project/pull/135298
None
>From f667ebbed7022431c6944d73050f828682cd526d Mon Sep 17 00:00:00 2001
From: Slava Zakharin <szakharin at nvidia.com>
Date: Thu, 10 Apr 2025 18:49:06 -0700
Subject: [PATCH] [flang-rt] Use runtime::memchr instead of std::memchr.
---
flang-rt/include/flang-rt/runtime/io-stmt.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/flang-rt/include/flang-rt/runtime/io-stmt.h b/flang-rt/include/flang-rt/runtime/io-stmt.h
index b6e95d155d01c..73c59b0b5ed29 100644
--- a/flang-rt/include/flang-rt/runtime/io-stmt.h
+++ b/flang-rt/include/flang-rt/runtime/io-stmt.h
@@ -20,6 +20,7 @@
#include "flang/Common/optional.h"
#include "flang/Common/reference-wrapper.h"
#include "flang/Common/visit.h"
+#include "flang/Runtime/freestanding-tools.h"
#include "flang/Runtime/io-api.h"
#include <flang/Common/variant.h>
#include <functional>
@@ -180,8 +181,8 @@ class IoStatementState {
private:
RT_API_ATTRS void CheckForAsterisk() {
- hasAsterisk_ =
- at_ && at_ < limit_ && std::memchr(at_, '*', limit_ - at_) != nullptr;
+ hasAsterisk_ = at_ && at_ < limit_ &&
+ runtime::memchr(at_, '*', limit_ - at_) != nullptr;
}
ConnectionState &connection_;
More information about the llvm-commits
mailing list