This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Support wasm exports with zero-length names.
ClosedPublic

Authored by sunfish on Dec 20 2019, 9:49 PM.

Details

Summary

Zero-length strings are valid export names in WebAssembly, so allow
users to specify them.

Diff Detail

Event Timeline

sunfish created this revision.Dec 20 2019, 9:49 PM
sbc100 accepted this revision.Jan 5 2020, 9:10 AM
sbc100 added inline comments.
lld/wasm/InputChunks.h
134

Is there a shorter way to write that? Does just {} work?

llvm/include/llvm/BinaryFormat/Wasm.h
182

Would it make sense to do the same for there two too? Or is that a followup?

This revision is now accepted and ready to land.Jan 5 2020, 9:10 AM

Shall we land this?

sunfish marked 2 inline comments as done.Mar 26 2020, 4:22 PM
sunfish added inline comments.
lld/wasm/InputChunks.h
134

Just {} didn't work, so I don't know of a shorter way offhand.

llvm/include/llvm/BinaryFormat/Wasm.h
182

Let's do that in a followup.

This revision was automatically updated to reflect the committed changes.