This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Attach a name to globals similarly to function naming
ClosedPublic

Authored by ncw on Mar 2 2018, 10:42 AM.

Details

Summary

This allows LLD to print the name for an InputGlobal when encountering an error.


NB. This PR specifies globals in the "name" section - but I don't think we need that now, and it's not "official" yet anyway: https://github.com/WebAssembly/design/pull/1064

Diff Detail

Repository
rL LLVM

Event Timeline

ncw created this revision.Mar 2 2018, 10:42 AM
sbc100 accepted this revision.Mar 2 2018, 11:20 AM
sbc100 added inline comments.
lib/Object/WasmObjectFile.cpp
428 ↗(On Diff #136797)

I'd rather not use auto unless the type is already present on the same line (i.e. when using dyn_cast).

This revision is now accepted and ready to land.Mar 2 2018, 11:20 AM
This revision was automatically updated to reflect the committed changes.
ncw marked an inline comment as done.Mar 5 2018, 4:19 AM
ncw added inline comments.
lib/Object/WasmObjectFile.cpp
428 ↗(On Diff #136797)

Committed with that fix