[PATCH] D150803: Add a new `wasm_custom` clang attribute for marking functions.

Brendan Dahl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 14 09:39:46 PDT 2023


brendandahl marked 4 inline comments as done.
brendandahl added inline comments.


================
Comment at: lld/test/wasm/custom-undefine.s:17
+        .type   bar, at function
+bar:
+        .functype       bar () -> ()
----------------
dschuff wrote:
> I don't fully understand how this test is different from custom-attr.s. Bar is still defined, so the only thing I can see that's different is that it's not called. Is it relying on the linker GCing bar so that it's not defined? is the result different when bar is really undefined?
Undefined is a bad name. I'll change to unreferenced or something. This tests when the function isn't referenced a tombstone will be placed in the custom section (e.g. the payload below has a FFFFFFFF).


================
Comment at: lld/test/wasm/merge-custom-attr-section.ll:47
+}
+
+attributes #0 = { "wasm-custom"="custom0" }
----------------
sbc100 wrote:
> Is there some reason we can't use assembly for this test?
Nope, I rewrote the other two, but missed this one. I'll fix.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150803



More information about the llvm-commits mailing list