[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
Thu Oct 31 09:58:24 PDT 2024


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


================
@@ -24,11 +24,34 @@
 #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(void *dest, const void *src, std::size_t count) {
----------------
clementval wrote:

```suggestion
static RT_API_ATTRS void *MemmoveWrapper(
    void *dest, const void *src, std::size_t count) {
```

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


More information about the flang-commits mailing list