Skip to content

Commit edfc21a

Browse files
authored
[OMPD] Runtime Entry Point functions for OMPD in libomp.so need C linkage as per standard. (#79246)
Adding extern "C" to all the entry point functions to make sure that these functions are not mangled.
1 parent 984dd15 commit edfc21a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

openmp/runtime/src/include/omp-tools.h.var

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ typedef enum kmp_mutex_impl_t {
211211
* definitions generated from spec
212212
*****************************************************************************/
213213

214+
#if defined(__cplusplus)
215+
extern "C" {
216+
#endif
217+
214218
typedef enum ompt_callbacks_t {
215219
ompt_callback_thread_begin = 1,
216220
ompt_callback_thread_end = 2,
@@ -1414,4 +1418,8 @@ typedef ompt_record_ompt_t *(*ompt_get_record_ompt_t) (
14141418

14151419
#define ompd_segment_none 0
14161420

1421+
#if defined(__cplusplus)
1422+
} // extern "C"
1423+
#endif
1424+
14171425
#endif /* __OMPT__ */

0 commit comments

Comments
 (0)