forked from OSchip/llvm-project
[flang] Fix broken build of flang with clang
A recent commit (e00a170) inadvertently exposed the Reshape runtime function as being extern "C", for which it is not yet ready, leading to a valid warning from clang that we treat as an error. Patch.
This commit is contained in:
parent
c1db35f0c2
commit
854367240d
|
@ -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<Descriptor> RTNAME(Reshape)(const Descriptor &source,
|
||||
const Descriptor &shape, const Descriptor *pad, const Descriptor *order,
|
||||
|
@ -464,6 +465,7 @@ OwningPtr<Descriptor> 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,
|
||||
|
|
|
@ -22,6 +22,13 @@
|
|||
#include "memory.h"
|
||||
|
||||
namespace Fortran::runtime {
|
||||
|
||||
// TODO: redo API, put under extern "C"
|
||||
OwningPtr<Descriptor> 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<Descriptor> 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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue