This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Use llvm::Optional to store optional symbol attributes. NFC.
ClosedPublic

Authored by sbc100 on Feb 5 2020, 11:25 PM.

Details

Summary

The changes the in-memory representation of wasm symbols such that their
optional ImportName and ImportModule use llvm::Optional.

ImportName is set whenever WASM_SYMBOL_EXPLICIT_NAME flag is set.
ImportField is set whenever the field in the object file is non-empty.

ImportName is set whenever WASM_SYMBOL_EXPLICIT_NAME flag is set.
ImportModule (for imports) is currently always set since it defaults to
"env".

In the future we can possibly extent to binary format distingish
import which have explit module names.

Diff Detail

Event Timeline

sbc100 created this revision.Feb 5 2020, 11:25 PM
sbc100 edited reviewers, added: sunfish, dschuff; removed: jhenderson.Feb 5 2020, 11:27 PM

Unit tests: unknown.

clang-tidy: unknown.

clang-format: unknown.

Build artifacts: CMakeCache.txt, console-log.txt

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

sbc100 updated this revision to Diff 245546.Feb 19 2020, 3:44 PM

rebase and cut down

sbc100 retitled this revision from [WebAssembly] Use llvm::Optional to store optional symbol attributes. to [WebAssembly] Use llvm::Optional to store optional symbol attributes. NFC..Feb 19 2020, 3:45 PM
sbc100 edited the summary of this revision. (Show Details)
sunfish accepted this revision.Feb 19 2020, 4:35 PM

LGTM!

This revision is now accepted and ready to land.Feb 19 2020, 4:35 PM
sbc100 updated this revision to Diff 245556.Feb 19 2020, 4:38 PM
sbc100 edited the summary of this revision. (Show Details)
  • clang-format
This revision was automatically updated to reflect the committed changes.