diff --git a/flang/runtime/transformational.cpp b/flang/runtime/transformational.cpp index e7cd089399f5..31262fbaadd3 100644 --- a/flang/runtime/transformational.cpp +++ b/flang/runtime/transformational.cpp @@ -351,6 +351,7 @@ void RTNAME(Pack)(Descriptor &result, const Descriptor &source, } } +} // extern "C" - TODO put Reshape under extern "C" // F2018 16.9.163 OwningPtr RTNAME(Reshape)(const Descriptor &source, const Descriptor &shape, const Descriptor *pad, const Descriptor *order, @@ -464,6 +465,7 @@ OwningPtr RTNAME(Reshape)(const Descriptor &source, return result; } +extern "C" { // TODO - remove when Reshape is under extern "C" // SPREAD void RTNAME(Spread)(Descriptor &result, const Descriptor &source, int dim, diff --git a/flang/runtime/transformational.h b/flang/runtime/transformational.h index 85d2ae5e8e3b..97d5664b16cb 100644 --- a/flang/runtime/transformational.h +++ b/flang/runtime/transformational.h @@ -22,6 +22,13 @@ #include "memory.h" namespace Fortran::runtime { + +// TODO: redo API, put under extern "C" +OwningPtr RTNAME(Reshape)(const Descriptor &source, + const Descriptor &shape, const Descriptor *pad = nullptr, + const Descriptor *order = nullptr, const char *sourceFile = nullptr, + int line = 0); + extern "C" { void RTNAME(Cshift)(Descriptor &result, const Descriptor &source, @@ -41,12 +48,6 @@ void RTNAME(Pack)(Descriptor &result, const Descriptor &source, const Descriptor &mask, const Descriptor *vector = nullptr, const char *sourceFile = nullptr, int line = 0); -// TODO: redo API -OwningPtr RTNAME(Reshape)(const Descriptor &source, - const Descriptor &shape, const Descriptor *pad = nullptr, - const Descriptor *order = nullptr, const char *sourceFile = nullptr, - int line = 0); - void RTNAME(Spread)(Descriptor &result, const Descriptor &source, int dim, std::int64_t ncopies, const char *sourceFile = nullptr, int line = 0);