Merge pull request #68524 from kateinoigakukun/katei/expose-wasm-sym

[wasm] Add `@_expose(wasm)` attribute for top-level functions
This commit is contained in:
Yuta Saito
2023-09-28 09:17:48 -07:00
committed by GitHub
18 changed files with 241 additions and 50 deletions

View File

@@ -299,6 +299,10 @@ private:
/// Name of a section if @_section attribute was used, otherwise empty.
StringRef Section;
/// Name of a Wasm export if @_expose(wasm) attribute was used, otherwise
/// empty.
StringRef WasmExportName;
/// Has value if there's a profile for this function
/// Contains Function Entry Count
ProfileCounter EntryCount;
@@ -1270,6 +1274,10 @@ public:
StringRef section() const { return Section; }
void setSection(StringRef value) { Section = value; }
/// Return Wasm export name if @_expose(wasm) was used, otherwise empty
StringRef wasmExportName() const { return WasmExportName; }
void setWasmExportName(StringRef value) { WasmExportName = value; }
/// Returns true if this function belongs to a declaration that returns
/// an opaque result type with one or more availability conditions that are
/// allowed to produce a different underlying type at runtime.