Skip to content

Commit e89129e

Browse files
authored
[flang][runtime] Added missing RT_API_ATTRS. (#101536)
1 parent 5e84646 commit e89129e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

flang/runtime/stack.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
namespace Fortran::runtime {
2020
// Storage for the Stack elements of type T.
2121
template <typename T, unsigned N> struct StackStorage {
22-
void *getElement(unsigned i) {
22+
RT_API_ATTRS void *getElement(unsigned i) {
2323
if (i < N) {
2424
return storage[i];
2525
} else {
2626
return nullptr;
2727
}
2828
}
29-
const void *getElement(unsigned i) const {
29+
RT_API_ATTRS const void *getElement(unsigned i) const {
3030
if (i < N) {
3131
return storage[i];
3232
} else {
@@ -43,8 +43,8 @@ template <typename T, unsigned N> struct StackStorage {
4343

4444
// 0-size specialization that provides no storage.
4545
template <typename T> struct alignas(T) StackStorage<T, 0> {
46-
void *getElement(unsigned) { return nullptr; }
47-
const void *getElement(unsigned) const { return nullptr; }
46+
RT_API_ATTRS void *getElement(unsigned) { return nullptr; }
47+
RT_API_ATTRS const void *getElement(unsigned) const { return nullptr; }
4848
};
4949

5050
template <typename T, unsigned N = 0> class Stack : public StackStorage<T, N> {

0 commit comments

Comments
 (0)