This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Symbol changes #4d: export import flags, LLD only
ClosedPublic

Authored by ncw on Jan 19 2018, 10:26 AM.

Details

Summary

This fixes an issue Sam identified in D42105.

D42105 was landed without the fix, and this is the followup patch to correct the omission.

Changes:

  • Symbol flags should be written out for imports as well as exports. D'oh.

Diff Detail

Repository
rL LLVM

Event Timeline

ncw created this revision.Jan 19 2018, 10:26 AM
sbc100 added inline comments.Jan 19 2018, 12:38 PM
wasm/Writer.cpp
389 ↗(On Diff #130652)

I think this should follow the CamelCase convention for local variables (at least that is what others seems to do in lld).

Neither of those two tests seems to pass now.

Perhaps because I'm trying to apply this to HEAD?

ncw added a comment.Jan 19 2018, 1:36 PM

Neither of those two tests seems to pass now.

Perhaps because I'm trying to apply this to HEAD?

Ah yes, I could fix that if you want to apply it before #2 and #3 - I probably should have done that anyway since #4a and #4b were already merged, sorry.

wasm/Writer.cpp
389 ↗(On Diff #130652)

Oops, I renamed it following some code I saw elsewhere. I checked the LLVM style guide and it didn't say what to do for lambdas - are they lowercase as functions, or uppercase as variables?

I see about 50/50 looking at the first 20 grep results for \[&\], so I guess it doesn't matter.

sbc100 added inline comments.Jan 19 2018, 1:47 PM
wasm/Writer.cpp
389 ↗(On Diff #130652)

In ELF and COFF directories I only see the CamelCase style, and I think we should follow them.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 19 2018, 1:52 PM
This revision was automatically updated to reflect the committed changes.