Skip to content

Commit e94a8ae

Browse files
authored
[flang-rt] Add RT_OFFLOAD_API_GROUP_BEGIN/END for DescriptorStack (llvm#3572)
2 parents 189e3e0 + e19378f commit e94a8ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

flang-rt/lib/runtime/temporary-stack.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ namespace {
2020

2121
using namespace Fortran::runtime;
2222

23+
RT_OFFLOAD_API_GROUP_BEGIN
24+
2325
// the number of elements to allocate when first creating the vector
2426
constexpr size_t INITIAL_ALLOC = 8;
2527

@@ -181,8 +183,11 @@ inline static DescriptorStack *getDescriptorStorage(void *opaquePtr) {
181183
return static_cast<DescriptorStack *>(opaquePtr);
182184
}
183185

186+
RT_OFFLOAD_API_GROUP_END
187+
184188
namespace Fortran::runtime {
185189
extern "C" {
190+
RT_EXT_API_GROUP_BEGIN
186191
void *RTNAME(CreateValueStack)(const char *sourceFile, int line) {
187192
return ValueStack::allocate(sourceFile, line);
188193
}
@@ -223,5 +228,6 @@ void RTNAME(DestroyDescriptorStack)(void *opaquePtr) {
223228
DescriptorStack::destroy(getDescriptorStorage(opaquePtr));
224229
}
225230

231+
RT_EXT_API_GROUP_END
226232
} // extern "C"
227233
} // namespace Fortran::runtime

0 commit comments

Comments
 (0)