This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Fix types for address taken functions
ClosedPublic

Authored by sbc100 on Jul 3 2017, 3:45 PM.

Details

Summary

Previously we were marking these symbols as functions but setting
their params and return types resulting in the wrong signature in
the generated wasm file.

This change ensure that all Symbols that are marked as function
also their parameters and return values set.

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Jul 3 2017, 3:45 PM
sbc100 edited the summary of this revision. (Show Details)Jul 3 2017, 3:48 PM
sbc100 added a reviewer: dschuff.
sbc100 added a subscriber: llvm-commits.
sbc100 updated this revision to Diff 105122.Jul 3 2017, 3:54 PM
  • simplify patch
dschuff accepted this revision.Jul 5 2017, 11:41 AM

LGTM with a nit. In the summary, did you mean that we were *not* setting their params and return types?

lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp
270 ↗(On Diff #105122)

Might as well make this a smallvector of size 1.

This revision is now accepted and ready to land.Jul 5 2017, 11:41 AM
sbc100 updated this revision to Diff 105325.Jul 5 2017, 1:15 PM
  • use 1 element vector for results
This revision was automatically updated to reflect the committed changes.