[flang-commits] [flang] [flang][runtime] Added missing RT_API_ATTRS. (PR #101536)
via flang-commits
flang-commits at lists.llvm.org
Thu Aug 1 11:02:34 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-runtime
Author: Slava Zakharin (vzakhari)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/101536.diff
1 Files Affected:
- (modified) flang/runtime/stack.h (+4-4)
``````````diff
diff --git a/flang/runtime/stack.h b/flang/runtime/stack.h
index fa438b35ec4b8..b6e6edb595e9a 100644
--- a/flang/runtime/stack.h
+++ b/flang/runtime/stack.h
@@ -19,14 +19,14 @@
namespace Fortran::runtime {
// Storage for the Stack elements of type T.
template <typename T, unsigned N> struct StackStorage {
- void *getElement(unsigned i) {
+ RT_API_ATTRS void *getElement(unsigned i) {
if (i < N) {
return storage[i];
} else {
return nullptr;
}
}
- const void *getElement(unsigned i) const {
+ RT_API_ATTRS const void *getElement(unsigned i) const {
if (i < N) {
return storage[i];
} else {
@@ -43,8 +43,8 @@ template <typename T, unsigned N> struct StackStorage {
// 0-size specialization that provides no storage.
template <typename T> struct alignas(T) StackStorage<T, 0> {
- void *getElement(unsigned) { return nullptr; }
- const void *getElement(unsigned) const { return nullptr; }
+ RT_API_ATTRS void *getElement(unsigned) { return nullptr; }
+ RT_API_ATTRS const void *getElement(unsigned) const { return nullptr; }
};
template <typename T, unsigned N = 0> class Stack : public StackStorage<T, N> {
``````````
</details>
https://github.com/llvm/llvm-project/pull/101536
More information about the flang-commits
mailing list