This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] MC: Refactor relocation handling
ClosedPublic

Authored by sbc100 on Jun 5 2017, 4:19 PM.

Details

Summary

The change cleans up and unifies the handling of relocation
entries in WasmObjectWriter. Type index relocation are no
longer handled seperately.

The only exteranlly visible change should be that type
index relocations are not longer grouped at the end.

Event Timeline

sbc100 created this revision.Jun 5 2017, 4:19 PM
sbc100 edited the summary of this revision. (Show Details)Jun 5 2017, 4:21 PM
sbc100 added reviewers: sunfish, jgravelle-google.
sbc100 updated this revision to Diff 101475.Jun 5 2017, 4:26 PM

Add reset method

sbc100 updated this revision to Diff 101476.Jun 5 2017, 4:29 PM
  • remove newline

Overall looks reasonable to me? Take that for what it's worth.

lib/MC/WasmObjectWriter.cpp
514

Why drop the assert message?

sbc100 updated this revision to Diff 101487.Jun 5 2017, 5:35 PM
  • create hasAddend
lib/MC/WasmObjectWriter.cpp
514

It was not accurate. I could update it but it pretty self explanatory already, and not something that a random dev or user would ever see. In fact it ended being more clear to create a method this this. What do you think?

lib/MC/WasmObjectWriter.cpp
514

Oo that is clearer, nice.

sbc100 added a comment.Jun 6 2017, 9:46 AM

@sunfish could you take a quick look?

sunfish accepted this revision.Jun 6 2017, 11:07 AM

Sounds good.

This revision is now accepted and ready to land.Jun 6 2017, 11:07 AM
This revision was automatically updated to reflect the committed changes.