This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Refactor symbol and symbol table to remove WasmSymbol references
ClosedPublic

Authored by sbc100 on Dec 19 2017, 8:26 PM.

Details

Summary

This WasmSymbol types comes directly from the input objects
but we want to be able to represent synthetic symbols too.

This is more in line with how the ELF linker represents symbols.

This change also removes the logic from Symbol::getVirtualAddress
for finding the global address and instead has the InputFile
provide this.

Event Timeline

sbc100 created this revision.Dec 19 2017, 8:26 PM
sbc100 updated this revision to Diff 127653.Dec 19 2017, 8:30 PM
  • clang-format
sbc100 updated this revision to Diff 127654.Dec 19 2017, 8:34 PM
  • refactor
sbc100 updated this revision to Diff 127655.Dec 19 2017, 8:37 PM
  • add comment

This change depends on D41315

sbc100 added a reviewer: ruiu.Dec 19 2017, 8:38 PM
ruiu accepted this revision.Dec 27 2017, 12:42 AM

LGTM

wasm/InputFiles.cpp
263

It felt that the function signature is a bit too flexible (for example, you could pass Kind::UndefinedFunctionKind to createDefined function), but since these functions are private functions, that's perhaps okay.

This revision is now accepted and ready to land.Dec 27 2017, 12:42 AM
sbc100 updated this revision to Diff 129179.Jan 9 2018, 4:06 PM
  • rebase
This revision was automatically updated to reflect the committed changes.