[flang-commits] [flang] [flang][runtime][NFC] Allow different memmove function in assign (PR #114301)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Fri Nov 1 14:35:34 PDT 2024


Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/114301 at github.com>


================
@@ -24,11 +24,35 @@
 #define FORTRAN_RUNTIME_ASSIGN_H_
 
 #include "flang/Runtime/entry-names.h"
+#include "flang/Runtime/freestanding-tools.h"
 
 namespace Fortran::runtime {
 class Descriptor;
+class Terminator;
+
+enum AssignFlags {
+  NoAssignFlags = 0,
+  MaybeReallocate = 1 << 0,
+  NeedFinalization = 1 << 1,
+  CanBeDefinedAssignment = 1 << 2,
+  ComponentCanBeDefinedAssignment = 1 << 3,
+  ExplicitLengthCharacterLHS = 1 << 4,
+  PolymorphicLHS = 1 << 5,
+  DeallocateLHS = 1 << 6
+};
+
+using MemmoveFct = void *(*)(void *, const void *, std::size_t);
+
+static RT_API_ATTRS void *MemmoveWrapper(
----------------
clementval wrote:

When building on the device the compiler is complaining when we address directly std:: function. Same was done in the `allocator-registry` https://github.com/llvm/llvm-project/blob/c1df376b0c8b3edbb6c5ad3fb6ebf39e75b5ad88/flang/include/flang/Runtime/allocator-registry.h#L37-L40

https://github.com/llvm/llvm-project/pull/114301


More information about the flang-commits mailing list