[PATCH] D48299: [WebAssembly] Only mark non-hidden symbols as live if they are also defined

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 21 02:22:23 PDT 2018


ncw accepted this revision.
ncw added a comment.
This revision is now accepted and ready to land.

Looks good. I'm deducing that when you removed the "hidden" from "used_undef_fn" and "unused_undef_fn", the test then failed - and then the code change makes it pass again. Makes sense.

We could also explicitly test everything - by adding used_undef_hidden_fn/used_undef_public_fn/unused_undef_hidden_fn/unused_undef_public_fn, and the same for the globals as well. Might be worth it, just to cover all the cases.



================
Comment at: test/wasm/gc-imports.ll:3
 ; RUN: yaml2obj %S/Inputs/undefined-globals.yaml -o %t_globals.o
 ; RUN: wasm-ld -print-gc-sections --allow-undefined -o %t1.wasm %t.o %t_globals.o
 
----------------
Could also remove `-print-gc-sections` here (or check/assert that its output matches what we expect). I think the checks were lost in all the debate about where and whether different section/function/global types would be reported...


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D48299





More information about the llvm-commits mailing list