[PATCH] D115749: [WebAssembly] Emit symbol labels for table global symbols

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 17 09:31:38 PST 2022


sbc100 added a comment.

In D115749#3248640 <https://reviews.llvm.org/D115749#3248640>, @pmatos wrote:

> @sbc100 I think I understand where this is going wrong. As far as I understand `emitExternalDecls` should only be emitting `.functype`, etc directives for external symbols and yet it's doing so for all symbols in `OutContext`, even those which are not external. I will have to revisit my assumptions and take a look at the code again, since the current solution of running `emitExternalDecls` in `onFinalization` means all directives come at the end and that doesn't work because it complains if, for example a reference to `bar` comes before `bar`s type declaration.

Yes, it makes sense to me that emitExternalDecls only applies to external symbols (those not defined in the module).    However, I would have thought that for typechecking reasons (we do basic type checking, unlike other asm backend) that all the external decls always come first.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115749



More information about the llvm-commits mailing list