mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[wasm] add @_extern(wasm) attribute support
This attribute instructs the compiler that this function declaration
should be "import"ed from host environment. It's equivalent of Clang's
`__attribute__((import_module("module"), import_name("field")))`
This commit is contained in:
@@ -58,7 +58,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
|
||||
/// describe what change you made. The content of this comment isn't important;
|
||||
/// it just ensures a conflict if two people change the module format.
|
||||
/// Don't worry about adhering to the 80-column limit for this line.
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 811; // default argument isolation
|
||||
const uint16_t SWIFTMODULE_VERSION_MINOR = 812; // @_extern(wasm)
|
||||
|
||||
/// A standard hash seed used for all string hashes in a serialized module.
|
||||
///
|
||||
@@ -2340,6 +2340,13 @@ namespace decls_block {
|
||||
BCBlob // declaration name
|
||||
>;
|
||||
|
||||
using ExternDeclAttrLayout = BCRecordLayout<Extern_DECL_ATTR,
|
||||
BCFixed<1>, // implicit flag
|
||||
BCVBR<4>, // number of bytes in module name
|
||||
BCVBR<4>, // number of bytes in name
|
||||
BCBlob // module name and declaration name
|
||||
>;
|
||||
|
||||
using DocumentationDeclAttrLayout = BCRecordLayout<
|
||||
Documentation_DECL_ATTR,
|
||||
BCFixed<1>, // implicit flag
|
||||
|
||||
Reference in New Issue
Block a user