Skip to content

Commit 6356eb3

Browse files
Merge pull request #307 from j-hui/add-extern-c
Add extern "C" to shim header file
2 parents 2b458e8 + 1be6eb5 commit 6356eb3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sources/_NumericsShims/include/_NumericsShims.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12+
#ifdef __cplusplus
13+
extern "C" {
14+
#endif
15+
1216
#define HEADER_SHIM static inline __attribute__((__always_inline__))
1317

1418
// This header uses most of the libm functions, but we don't want to end up
@@ -450,3 +454,7 @@ HEADER_SHIM void _numerics_optimization_barrier(const void *pointer) {
450454
}
451455

452456
#undef CLANG_RELAX_FP
457+
458+
#ifdef __cplusplus
459+
}
460+
#endif

0 commit comments

Comments
 (0)