[PATCH] D150803: [WebAssembly] Add a new `wasm_async` clang attribute for marking async functions.

Brendan Dahl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 24 15:02:55 PDT 2023


brendandahl added inline comments.


================
Comment at: clang/include/clang/Basic/Attr.td:1984
+                       TargetSpecificAttr<TargetWebAssembly> {
+  let Spellings = [Clang<"wasm_async">];
+  let Documentation = [WebAssemblyAsyncDocs];
----------------
sbc100 wrote:
> Should we call this em_async or emscripten_async since this is an emscripten-specific attribute?
I wouldn't say this is emscripten specific. You could use this with clang+binaryen without emscripten.


================
Comment at: llvm/lib/MC/MCExpr.cpp:530
+      .Case("tpoff_lo", VK_VE_TPOFF_LO32)
+      .Default(VK_Invalid);
 }
----------------
sbc100 wrote:
> Was this whole block indented?  Maybe limit this to just a single line change?
This was changed by `git-clang-format HEAD~1` . I can revert though and only change that line.


================
Comment at: llvm/test/MC/WebAssembly/async.s:10-11
+
+.section        .custom_section.async,"",@
+    .int32  foo at FUNCINDEX
+
----------------
aheejin wrote:
> The intention looks little weird.. Is that what `llc` emits? 
Yeah, I wasn't really sure how to format, but that's what llc was doing. Open to changing it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150803/new/

https://reviews.llvm.org/D150803



More information about the cfe-commits mailing list