Skip to content

Commit 8009f45

Browse files
committed
[embedded] Avoid warning about redefined macro by using attributes directly
1 parent b718c50 commit 8009f45

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

stdlib/public/SwiftShims/swift/shims/EmbeddedShims.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@
2828
extern "C" {
2929
#endif
3030

31-
#define SWIFT_CC __attribute__((swiftcall))
32-
#define SWIFT_CONTEXT __attribute__((swift_context))
33-
34-
typedef void SWIFT_CC (*HeapObjectDestroyer)(SWIFT_CONTEXT void *object);
31+
typedef void __attribute__((swiftcall)) (*HeapObjectDestroyer)(
32+
__attribute__((swift_context)) void *object);
3533

3634
static inline void _swift_embedded_invoke_heap_object_destroy(void *object) {
3735
void *metadata = *(void **)object;

0 commit comments

Comments
 (0)