[flang-commits] [flang] e89129e - [flang][runtime] Added missing RT_API_ATTRS. (#101536)

via flang-commits flang-commits at lists.llvm.org
Thu Aug 1 13:16:37 PDT 2024


Author: Slava Zakharin
Date: 2024-08-01T13:16:34-07:00
New Revision: e89129ed30d64ed61e38269b1722adc18844a31c

URL: https://github.com/llvm/llvm-project/commit/e89129ed30d64ed61e38269b1722adc18844a31c
DIFF: https://github.com/llvm/llvm-project/commit/e89129ed30d64ed61e38269b1722adc18844a31c.diff

LOG: [flang][runtime] Added missing RT_API_ATTRS. (#101536)

Added: 
    

Modified: 
    flang/runtime/stack.h

Removed: 
    


################################################################################
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> {


        


More information about the flang-commits mailing list