Skip to content

Commit fbc9e5c

Browse files
committed
comments
1 parent fdacff5 commit fbc9e5c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Sources/_SwiftSyntaxCShims/wasm_support.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@
1818
#define _STR(X) #X
1919
#define STR(X) _STR(X)
2020

21-
// this must be a metadata section rather than a data section so we can't
22-
// use __attribute__((section)) for it
21+
// LLVM has special-cased handling to map .custom_section.foo to
22+
// Wasm Custom Section "foo". this must be a metadata section rather
23+
// than a data section so we can't use __attribute__((section)) for it.
24+
// See: https://reviews.llvm.org/D43097
2325
__asm__("\t.section .custom_section.swift_wasm_macro_abi,\"\",@\n\t.4byte " STR(SWIFT_WASM_ABI_VERSION_RAW) "\n");
2426

27+
// defined in CompilerPlugin.swift
2528
void _swift_wasm_macro_pump(void);
2629

2730
__attribute__((export_name("swift_wasm_macro_pump")))

0 commit comments

Comments
 (0)