[AArch64,ELF] Restrict MOVZ/MOVK to non-PIC large code model (#70178)
[llvm-project.git] / flang / runtime / copy.h
blob5d725de725735ebf4bafa8d7ec18c0517e6aaad5
1 //===-- runtime/copy.h ------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // Utilities that copy data in a type-aware fashion, allocating & duplicating
10 // allocatable/automatic components of derived types along the way.
12 #ifndef FORTRAN_RUNTIME_COPY_H_
13 #define FORTRAN_RUNTIME_COPY_H_
15 #include "flang/Runtime/descriptor.h"
17 namespace Fortran::runtime {
19 // Assigns to uninitialized storage.
20 // Duplicates allocatable & automatic components.
21 RT_API_ATTRS void CopyElement(const Descriptor &to, const SubscriptValue toAt[],
22 const Descriptor &from, const SubscriptValue fromAt[], Terminator &);
24 // Copies data from one allocated descriptor's array to another.
25 RT_API_ATTRS void CopyArray(
26 const Descriptor &to, const Descriptor &from, Terminator &);
28 } // namespace Fortran::runtime
29 #endif // FORTRAN_RUNTIME_COPY_H_