|
9 | 9 | #include "copy.h" |
10 | 10 | #include "stack.h" |
11 | 11 | #include "flang-rt/runtime/descriptor.h" |
| 12 | +#include "flang-rt/runtime/tools.h" |
12 | 13 | #include "flang-rt/runtime/terminator.h" |
13 | 14 | #include "flang-rt/runtime/type-info.h" |
14 | 15 | #include "flang/Runtime/allocatable.h" |
@@ -101,7 +102,7 @@ RT_API_ATTRS void CopyElement(const Descriptor &to, const SubscriptValue toAt[], |
101 | 102 | char *toPtr{to.Element<char>(toAt)}; |
102 | 103 | char *fromPtr{from.Element<char>(fromAt)}; |
103 | 104 | RUNTIME_CHECK(terminator, to.ElementBytes() == from.ElementBytes()); |
104 | | - std::memcpy(toPtr, fromPtr, to.ElementBytes()); |
| 105 | + Fortran::runtime::memcpy(toPtr, fromPtr, to.ElementBytes()); |
105 | 106 | return; |
106 | 107 | } |
107 | 108 |
|
@@ -148,7 +149,7 @@ RT_API_ATTRS void CopyElement(const Descriptor &to, const SubscriptValue toAt[], |
148 | 149 | // Moreover, if we came here from an Component::Genre::Data component, |
149 | 150 | // all the per-element copies are redundant, because the parent |
150 | 151 | // has already been copied as a whole. |
151 | | - std::memcpy(toPtr, fromPtr, curTo.ElementBytes()); |
| 152 | + Fortran::runtime::memcpy(toPtr, fromPtr, curTo.ElementBytes()); |
152 | 153 | --elements; |
153 | 154 | if (elements != 0) { |
154 | 155 | currentCopy.IncrementSubscripts(terminator); |
|
0 commit comments