[wasm] add @_expose(wasm) attribute support

This attribute instructs the compiler that this function declaration
should be "export"ed from this .wasm module. It's equivalent of Clang's
`__attribute__((export_name("name")))`
This commit is contained in:
Yuta Saito
2023-08-31 00:03:47 +00:00
parent cd3e6e3481
commit 6d378a3ec3
17 changed files with 214 additions and 46 deletions

View File

@@ -5795,10 +5795,11 @@ llvm::Error DeclDeserializer::deserializeDeclCommon() {
}
case decls_block::Expose_DECL_ATTR: {
unsigned kind;
bool isImplicit;
serialization::decls_block::ExposeDeclAttrLayout::readRecord(
scratch, isImplicit);
Attr = new (ctx) ExposeAttr(blobData, isImplicit);
scratch, kind, isImplicit);
Attr = new (ctx) ExposeAttr(blobData, (ExposureKind)kind, isImplicit);
break;
}