[memprof] Use LineLocation in a unit test (NFC) (#116917)
[llvm-project.git] / flang / runtime / assign-impl.h
blobaaa320ef7f9591633ad52002a677a97f0f4bb659
1 //===-- runtime/assign-impl.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 #ifndef FORTRAN_RUNTIME_ASSIGN_IMPL_H_
10 #define FORTRAN_RUNTIME_ASSIGN_IMPL_H_
12 #include "flang/Runtime/freestanding-tools.h"
14 namespace Fortran::runtime {
15 class Descriptor;
16 class Terminator;
18 // Assign one object to another via allocate statement from source specifier.
19 // Note that if allocate object and source expression have the same rank, the
20 // value of the allocate object becomes the value provided; otherwise the value
21 // of each element of allocate object becomes the value provided (9.7.1.2(7)).
22 #ifdef RT_DEVICE_COMPILATION
23 RT_API_ATTRS void DoFromSourceAssign(Descriptor &, const Descriptor &,
24 Terminator &, MemmoveFct memmoveFct = &MemmoveWrapper);
25 #else
26 RT_API_ATTRS void DoFromSourceAssign(Descriptor &, const Descriptor &,
27 Terminator &, MemmoveFct memmoveFct = &Fortran::runtime::memmove);
28 #endif
30 } // namespace Fortran::runtime
31 #endif // FORTRAN_RUNTIME_ASSIGN_IMPL_H_